/**
 * S1 Personnel Dashboard Styles
 */

/* Container */
.s1-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--header-height, 60px));
    max-height: calc(100vh - var(--header-height, 60px));
    width: 100%;
    background: var(--bg-secondary);
    padding: 16px;
    overflow: hidden;
    box-sizing: border-box;
}

/* When embedded in dashboard view, hidden by default */
.dashboard-view .s1-container {
    display: none;
}

.dashboard-view .s1-container.active {
    display: flex;
}

/* Header */
.s1-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.s1-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.s1-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.s1-header h2 i {
    color: var(--primary-color, #3b82f6);
}

.s1-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Tabs */
.s1-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.s1-tab-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    font-size: 13px;
    transition: all 0.2s;
}

.s1-tab-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.s1-tab-btn.active {
    background: var(--primary);
    color: white;
}

/* Filters */
.s1-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.s1-filter-select {
    flex: 1;
    max-width: 200px;
    padding: 6px 10px;
    font-size: 12px;
}

/* Main Content */
.s1-main-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px;
    padding-bottom: 20px;
    min-height: 0; /* Important for flex child scrolling */
}

/* Summary Cards */
.s1-summary-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.s1-card {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border-color);
}

.s1-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.s1-card-total .s1-card-icon { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.s1-card-active .s1-card-icon { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.s1-card-reserve .s1-card-icon { background: rgba(107, 114, 128, 0.15); color: #6b7280; }
.s1-card-warning .s1-card-icon { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.s1-card-alert .s1-card-icon { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

.s1-card-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.s1-card-label {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Warnings Panel */
.s1-warnings-panel {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}

.s1-warnings-panel h3 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #ef4444;
}

.s1-warnings-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.s1-warning-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
}

.s1-warning-red { background: rgba(239, 68, 68, 0.2); color: #dc2626; }
.s1-warning-yellow { background: rgba(245, 158, 11, 0.2); color: #d97706; }

/* Personnel List */
.s1-personnel-list {
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.s1-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.s1-list-header h3 {
    margin: 0;
    font-size: 14px;
}

/* Table */
.s1-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.s1-table th,
.s1-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.s1-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 11px;
    text-transform: uppercase;
}

.s1-table tbody tr:hover {
    background: var(--bg-tertiary);
}

.s1-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 24px !important;
}

/* Badges */
.s1-qual-badges {
    display: flex;
    gap: 4px;
    margin-top: 4px;
}

.s1-qual-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 600;
    color: white;
}

.s1-qual-badge-small {
    display: inline-block;
    padding: 1px 4px;
    border-radius: 2px;
    font-size: 8px;
    font-weight: 600;
    color: white;
}

.s1-org-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    color: white;
}

.s1-org-badge-small {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 600;
    color: white;
    margin-left: 6px;
}

.s1-status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    color: white;
}

.s1-count-badge {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Actions */
.s1-actions {
    display: flex;
    gap: 4px;
}

.s1-action-btn {
    padding: 4px 8px;
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s;
}

.s1-action-btn:hover {
    background: var(--primary);
    color: white;
}

.s1-action-danger:hover {
    background: #ef4444;
}

/* Organization Breakdown */
.s1-org-breakdown {
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 16px;
}

.s1-org-breakdown h3 {
    margin: 0 0 12px 0;
    font-size: 14px;
}

.s1-org-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.s1-org-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-secondary);
    border-radius: 20px;
    border: 2px solid;
}

.s1-org-name {
    font-size: 12px;
}

.s1-org-count {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    color: white;
}

/* Shifts */
.s1-shifts-container {
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 16px;
}

.s1-shifts-container h3 {
    margin: 0 0 16px 0;
    font-size: 14px;
}

.s1-shifts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.s1-shift-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
}

.s1-shift-info {
    flex: 1;
    min-width: 200px;
}

.s1-shift-name {
    font-weight: 600;
    font-size: 13px;
}

.s1-shift-meta {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.s1-shift-bar-container {
    flex: 2;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.s1-shift-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s;
}

.s1-bar-green { background: #10b981; }
.s1-bar-yellow { background: #f59e0b; }
.s1-bar-red { background: #ef4444; }

.s1-shift-time {
    min-width: 80px;
    text-align: right;
}

.s1-hours-worked {
    font-weight: 600;
    font-size: 14px;
}

.s1-hours-max {
    font-size: 11px;
    color: var(--text-secondary);
}

.s1-shift-actions {
    display: flex;
    gap: 4px;
}

/* Qualifications */
.s1-qualifications-container {
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 16px;
}

.s1-qualifications-container h3,
.s1-qualifications-container h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
}

.s1-qual-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.s1-qual-card {
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
}

.s1-qual-ok { border-color: #10b981; }
.s1-qual-warning { border-color: #f59e0b; }
.s1-qual-danger { border-color: #ef4444; }

.s1-qual-header {
    padding: 8px;
    text-align: center;
}

.s1-qual-short {
    font-size: 14px;
    font-weight: 700;
    color: white;
}

.s1-qual-body {
    padding: 12px;
    text-align: center;
}

.s1-qual-name {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.s1-qual-numbers {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.s1-qual-actual {
    font-size: 20px;
    font-weight: 700;
}

.s1-qual-required {
    font-size: 12px;
    color: var(--text-secondary);
}

.s1-qual-diff {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
}

.s1-diff-ok { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.s1-diff-bad { background: rgba(239, 68, 68, 0.2); color: #ef4444; }

.s1-matrix-table {
    margin-top: 16px;
}

.s1-row-warning {
    background: rgba(245, 158, 11, 0.1);
}

/* Requirements */
.s1-requirements-container {
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 16px;
}

.s1-requirements-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.s1-requirements-header h3 {
    margin: 0;
    font-size: 14px;
}

.s1-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.s1-empty-state i {
    font-size: 48px;
    opacity: 0.3;
    margin-bottom: 16px;
}

.s1-empty-state p {
    margin: 0 0 16px 0;
}

.s1-empty-state .btn {
    /* Button nicht volle Breite */
}

/* Empty State in Grid-Containern zentriert über volle Breite */
.s1-vehicles-grid .s1-empty-state,
.s1-external-grid .s1-empty-state,
.s1-personnel-grid .s1-empty-state {
    grid-column: 1 / -1;
}

.s1-req-line {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    margin-bottom: 4px;
}

.s1-req-warning {
    color: #d97706;
}

/* Modal Specific */
.s1-qual-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.s1-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 12px;
}

.s1-checkbox-label input {
    margin: 0;
}

.s1-import-format {
    background: var(--bg-secondary);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 12px;
}

.s1-requirements-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.s1-req-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.s1-req-qual-name {
    flex: 1;
    font-size: 12px;
}

.s1-req-input {
    width: 60px;
    text-align: center;
}

.s1-settings-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.s1-settings-tab {
    padding: 6px 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    border-radius: 4px;
}

.s1-settings-tab.active {
    background: var(--primary);
    color: white;
}

.s1-settings-list {
    max-height: 300px;
    overflow-y: auto;
}

.s1-settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid var(--border-color);
}

.s1-settings-item:last-child {
    border-bottom: none;
}

/* Status Buttons */
.s1-status-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.s1-status-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    background: var(--bg-secondary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.s1-status-btn:hover {
    border-color: var(--status-color);
    background: var(--bg-tertiary);
}

.s1-status-btn.active {
    border-color: var(--status-color);
    background: var(--status-color);
    color: white;
}

.s1-status-btn i {
    font-size: 16px;
}

/* No Operation Message */
.s1-no-operation {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
    text-align: center;
}

.s1-no-operation i {
    font-size: 48px;
    opacity: 0.3;
    margin-bottom: 16px;
}

.s1-no-operation h3 {
    margin: 0 0 8px 0;
}

.s1-no-operation p {
    margin: 0 0 20px 0;
}

.s1-operation-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: 300px;
}

.s1-operation-select-wrapper {
    width: 100%;
}

.s1-operation-select-wrapper label {
    display: block;
    font-size: 12px;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.s1-operation-select-wrapper select {
    width: 100%;
}

.s1-operation-divider {
    color: var(--text-secondary);
    font-size: 12px;
}

/* Shifts Header */
.s1-shifts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.s1-shifts-header h3 {
    margin: 0;
    font-size: 14px;
}

.s1-shifts-section {
    margin-bottom: 20px;
}

.s1-shifts-section h4 {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.s1-shift-resting {
    opacity: 0.7;
    background: var(--bg-tertiary);
}

/* ===== KANBAN BOARD ===== */
.s1-kanban-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.s1-kanban-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.s1-kanban-header h3 {
    margin: 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.s1-kanban-board {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    flex: 1;
    overflow-y: auto;
    padding-bottom: 8px;
    align-content: flex-start;
}

.s1-kanban-column {
    min-width: 180px;
    max-width: 200px;
    flex: 1 1 calc(20% - 12px);
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    max-height: calc(50% - 6px);
}

.s1-kanban-column-header {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.s1-kanban-column-title {
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.s1-kanban-column-count {
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.s1-kanban-column-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    min-height: 80px;
}

.s1-kanban-column-content.drag-over {
    background: rgba(59, 130, 246, 0.1);
    border: 2px dashed var(--primary-color);
    border-radius: 4px;
}

.s1-kanban-card {
    background: var(--bg-secondary);
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
    cursor: grab;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.s1-kanban-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.s1-kanban-card.dragging {
    opacity: 0.5;
    transform: rotate(3deg);
}

.s1-kanban-card-name {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
}

.s1-kanban-card-meta {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.s1-kanban-card-time {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    font-size: 10px;
}

.s1-kanban-card-time .s1-time-bar {
    flex: 1;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
}

.s1-kanban-card-time .s1-time-progress {
    height: 100%;
    border-radius: 2px;
}

.s1-kanban-add-btn {
    width: 100%;
    padding: 8px;
    border: 1px dashed var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.s1-kanban-add-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ===== EXTERNAL FORCES TAB ===== */
.s1-external-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    min-height: 400px;
}

@media (max-width: 1400px) {
    .s1-external-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .s1-external-container {
        grid-template-columns: 1fr;
    }
}

.s1-external-column {
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    min-height: 300px;
}

.s1-external-column-header {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 13px;
    border-bottom: 1px solid var(--border-color);
    border-radius: 8px 8px 0 0;
}

.s1-external-column-header.angefordert {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.05));
    color: #f59e0b;
}

.s1-external-column-header.auf-marsch {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(139, 92, 246, 0.05));
    color: #8b5cf6;
}

.s1-external-column-header.im-raum {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05));
    color: #10b981;
}

.s1-external-column-header.abgerueckt {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.15), rgba(107, 114, 128, 0.05));
    color: #6b7280;
}

.s1-external-column-header i {
    font-size: 14px;
}

.s1-external-count {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}

.s1-external-dropzone {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 200px;
    transition: background 0.2s;
}

.s1-external-dropzone.drag-over {
    background: rgba(59, 130, 246, 0.1);
    border: 2px dashed var(--primary-color);
    border-radius: 0 0 8px 8px;
}

.s1-external-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    font-size: 12px;
    font-style: italic;
}

.s1-external-card {
    background: var(--bg-secondary);
    border-radius: 6px;
    border: 1px solid var(--border-color);
    padding: 10px;
    cursor: grab;
    transition: transform 0.2s, box-shadow 0.2s;
}

.s1-external-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.s1-external-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.s1-external-card .s1-external-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.s1-external-symbol {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
}

.s1-external-title {
    flex: 1;
    min-width: 0;
}

.s1-external-name {
    font-weight: 600;
    font-size: 13px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.s1-external-city {
    font-size: 11px;
    color: var(--text-secondary);
    display: block;
}

.s1-external-info {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.s1-external-org {
    margin-bottom: 4px;
}

.s1-external-section {
    margin-bottom: 4px;
    color: var(--primary-color);
}

.s1-external-counts {
    display: flex;
    gap: 12px;
}

.s1-external-counts span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.s1-external-eta {
    font-size: 11px;
    padding: 4px 8px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 4px;
    color: #f59e0b;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.s1-external-actions {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

/* DateTime Picker (separate date and time fields) */
.s1-datetime-picker {
    display: flex;
    gap: 8px;
}

.s1-datetime-picker input[type="date"] {
    flex: 1;
}

.s1-datetime-picker input[type="time"] {
    width: 120px;
    flex-shrink: 0;
}

/* ===== SECTIONS TAB (ABSCHNITTE) ===== */

/* Sections Tab Main Header */
.s1-sections-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.s1-sections-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.s1-sections-header h3 i {
    color: #3b82f6;
}

.s1-sections-header .btn {
    width: auto;
}

/* Section Blocks (Einsatzabschnitte, Bereitstellungsräume, Versorgungsräume) */
.s1-section-block {
    margin-bottom: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.s1-section-block-header {
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.s1-section-block-header h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.s1-section-block-header h4 i {
    width: 20px;
    text-align: center;
}

/* Icon colors for different block types */
.s1-section-block:nth-of-type(1) .s1-section-block-header h4 i {
    color: #3b82f6; /* Blau für Einsatzabschnitte */
}

.s1-section-block:nth-of-type(2) .s1-section-block-header h4 i {
    color: #22c55e; /* Grün für Bereitstellungsräume */
}

.s1-section-block:nth-of-type(3) .s1-section-block-header h4 i {
    color: #f59e0b; /* Orange für Versorgungsräume */
}

/* Staging Areas Grid (für Bereitstellungs- und Versorgungsräume) */
.s1-staging-areas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.s1-staging-area-card {
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.s1-staging-area-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.s1-staging-area-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.s1-staging-area-card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.s1-staging-area-card-title i {
    font-size: 1rem;
}

.s1-staging-area-card-actions {
    display: flex;
    gap: 0.25rem;
}

.s1-staging-area-card-actions .btn-icon {
    padding: 4px 6px;
    font-size: 0.75rem;
}

.s1-staging-area-card-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.s1-staging-area-card-info span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.s1-staging-area-card-info i {
    width: 16px;
    text-align: center;
    color: var(--text-tertiary);
}

.s1-staging-area-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.s1-staging-area-status.available {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.s1-staging-area-status.partial {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.s1-staging-area-status.full {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.s1-staging-area-status.closed {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

.s1-sections-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 16px;
}

.s1-section-card {
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.s1-section-card-header {
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.s1-section-card-title {
    font-weight: 600;
    font-size: 14px;
}

.s1-section-card-body {
    padding: 12px;
}

.s1-section-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.s1-section-stat {
    text-align: center;
}

.s1-section-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.s1-section-stat-label {
    font-size: 10px;
    color: var(--text-secondary);
}

.s1-section-personnel-list {
    max-height: 200px;
    overflow-y: auto;
}

.s1-section-person {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 12px;
}

.s1-section-person:last-child {
    border-bottom: none;
}

/* ===== TIMELINE / SCHEDULE ===== */
.s1-timeline-container {
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 16px;
}

.s1-timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.s1-timeline {
    position: relative;
    padding-left: 24px;
}

.s1-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.s1-timeline-item {
    position: relative;
    padding-bottom: 16px;
    padding-left: 16px;
}

.s1-timeline-item::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid var(--bg-primary);
}

.s1-timeline-item.past::before {
    background: var(--text-secondary);
}

.s1-timeline-item.future::before {
    background: transparent;
    border: 2px solid var(--primary-color);
}

.s1-timeline-time {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.s1-timeline-content {
    font-size: 13px;
}

/* ===== FORCES TAB (KRÄFTE) ===== */
.s1-forces-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.s1-forces-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.s1-force-stat {
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 16px;
    text-align: center;
}

.s1-force-stat-value {
    font-size: 28px;
    font-weight: 700;
}

.s1-force-stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Responsive */
@media (max-width: 1200px) {
    .s1-summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .s1-kanban-column {
        min-width: 240px;
    }
}

@media (max-width: 768px) {
    .s1-summary-cards {
        grid-template-columns: 1fr;
    }

    .s1-filters {
        flex-wrap: wrap;
    }

    .s1-filter-select {
        max-width: none;
    }

    .s1-kanban-board {
        flex-direction: column;
    }

    .s1-kanban-column {
        min-width: 100%;
        max-width: 100%;
    }
}

/* ========== VEHICLES TAB ========== */
.s1-vehicles-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.s1-vehicles-header,
.s1-personnel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: 8px;
}

.s1-vehicles-header h3,
.s1-personnel-header h3 {
    margin: 0;
    font-size: 16px;
}

.s1-vehicles-stats,
.s1-personnel-stats {
    display: flex;
    gap: 16px;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: 8px;
}

.s1-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 16px;
}

.s1-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.s1-stat-label {
    font-size: 11px;
    color: var(--text-secondary);
}

.s1-vehicle-section {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 12px;
}

.s1-section-header {
    margin-bottom: 12px;
}

.s1-section-header h4 {
    margin: 0;
    font-size: 14px;
    color: var(--text-primary);
}

.s1-vehicle-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.s1-vehicle-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    transition: all 0.2s;
}

.s1-vehicle-card:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.s1-vehicle-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.s1-vehicle-symbol {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.s1-vehicle-icon {
    font-size: 24px;
    color: var(--text-secondary);
}

.s1-vehicle-info {
    flex: 1;
}

.s1-vehicle-name {
    font-weight: 600;
    font-size: 14px;
}

.s1-vehicle-callsign {
    font-size: 11px;
    color: var(--text-secondary);
}

.s1-vehicle-card-body {
    margin-bottom: 8px;
}

.s1-vehicle-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.s1-vehicle-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.s1-vehicle-status {
    padding: 2px 8px;
    border-radius: 4px;
    color: white;
    font-size: 10px;
    font-weight: 500;
}

.s1-vehicle-crew {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.s1-crew-badge {
    padding: 2px 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    font-size: 10px;
}

.s1-crew-more {
    padding: 2px 6px;
    background: var(--primary);
    color: white;
    border-radius: 3px;
    font-size: 10px;
}

.s1-vehicle-card-actions {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

.s1-vehicle-action-btn {
    padding: 4px 8px;
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.s1-vehicle-action-btn:hover {
    background: var(--primary);
    color: white;
}

.s1-vehicle-action-btn.s1-action-danger:hover {
    background: var(--danger);
}

/* Symbol Selector */
.symbol-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.selected-symbol {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.no-symbol-selected {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--text-secondary);
    text-align: center;
    background: var(--bg-tertiary);
    border-radius: 4px;
}

/* Symbol Picker Modal */
.symbol-search {
    margin-bottom: 12px;
}

.symbol-categories {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.symbol-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.symbol-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.symbol-item:hover {
    border-color: var(--primary);
    background: var(--bg-tertiary);
}

.symbol-item img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin-bottom: 4px;
}

.symbol-item span {
    font-size: 9px;
    text-align: center;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

/* Crew Modal */
.crew-capacity-info {
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: 4px;
    margin-bottom: 16px;
    font-weight: 500;
}

.crew-current,
.crew-available {
    margin-bottom: 16px;
}

.crew-current h4,
.crew-available h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
}

.crew-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.crew-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: 4px;
}

.crew-name {
    flex: 1;
    font-weight: 500;
}

.crew-role {
    font-size: 11px;
    color: var(--text-secondary);
}

.available-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 200px;
    overflow-y: auto;
}

.available-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
}

.available-item label {
    flex: 1;
    cursor: pointer;
}

.org-badge {
    font-size: 10px;
    padding: 2px 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    color: var(--text-secondary);
}

/* Kanban card with symbol */
.s1-kanban-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.s1-kanban-card-symbol {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Symbol category button active state */
.symbol-cat-btn.active {
    background: var(--primary);
    color: white;
}

/* ========== Vehicle Groups ========== */
.s1-groups-section {
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.s1-groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.s1-group-card {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 12px;
    transition: all 0.2s;
}

.s1-group-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.s1-group-card-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.s1-group-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.s1-group-info {
    flex: 1;
    min-width: 0;
}

.s1-group-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.s1-group-section {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.s1-group-status {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    white-space: nowrap;
}

.s1-group-progress {
    margin-bottom: 10px;
}

.s1-progress-bar {
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.s1-progress-fill {
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 3px;
}

.s1-progress-text {
    font-size: 11px;
    color: var(--text-secondary);
}

.s1-group-requirements {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.s1-requirement-badge {
    font-size: 10px;
    padding: 2px 6px;
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    border-radius: 4px;
}

.s1-requirement-more {
    font-size: 10px;
    padding: 2px 6px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 4px;
}

.s1-group-members {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 10px;
}

.s1-member-badge {
    font-size: 10px;
    padding: 2px 6px;
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border-radius: 4px;
}

.s1-member-more {
    font-size: 10px;
    padding: 2px 6px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 4px;
}

.s1-group-card-actions {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

.s1-group-action-btn {
    padding: 4px 8px;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.s1-group-action-btn:hover {
    background: var(--primary);
    color: white;
}

.s1-group-action-btn.s1-action-danger:hover {
    background: var(--danger);
}

.s1-badge-warning {
    font-size: 11px;
    padding: 2px 8px;
    background: #f59e0b;
    color: white;
    border-radius: 12px;
    margin-left: 8px;
}

/* ==================== NEW TAB-BASED LAYOUT ==================== */

/* Tab Navigation (new style) */
.s1-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    font-size: 13px;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.s1-tab:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.s1-tab.active {
    background: var(--bg-primary);
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.s1-tab i {
    font-size: 14px;
}

/* Tab Content */
.s1-content {
    flex: 1;
    overflow: hidden;
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.s1-tab-content {
    display: none;
    height: 100%;
    overflow-y: auto;
    padding: 16px;
}

.s1-tab-content.active {
    display: block;
}

/* Overview Grid */
.s1-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* Cards for Overview */
.s1-card-wide {
    grid-column: span 1;
}

.s1-card-full {
    grid-column: span 2;
    display: block;
}

.s1-card-warnings {
    grid-column: span 1;
}

.s1-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.s1-card-stats .s1-card-header {
    margin-bottom: 0;
    gap: 40px;
}

.s1-card-stats .s1-card-header h3 {
    flex-shrink: 0;
}

.s1-card-stats .s1-stats-row {
    flex: 1;
}

.s1-card-header h3 {
    margin: 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.s1-card-body {
    padding: 0;
}

/* Stats Row */
.s1-stats-row {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.s1-stat-box {
    flex: 0 0 auto;
    min-width: 70px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    text-align: center;
    border-left: 3px solid var(--border-color);
}

.s1-stat-box.active {
    border-left-color: #10b981;
}

.s1-stat-box.reserve,
.s1-stat-box.available {
    border-left-color: #6b7280;
}

.s1-stat-box.warning {
    border-left-color: #f59e0b;
}

.s1-stat-box.im-raum {
    border-left-color: #3b82f6;
}

.s1-stat-box.auf-marsch {
    border-left-color: #8b5cf6;
}

.s1-stat-box.bereit {
    border-left-color: #10b981;
}

.s1-stat-box.angefordert {
    border-left-color: #f59e0b;
}

.s1-stat-box.abgerueckt {
    border-left-color: #6b7280;
}

.s1-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.s1-stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* No Warnings */
.s1-no-warnings {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 6px;
}

/* Section Cards for Overview */
.s1-sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
    width: 100%;
}

.s1-section-card {
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.s1-section-card-header {
    padding: 10px 12px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.s1-section-name {
    font-weight: 600;
    font-size: 13px;
}

.s1-section-code {
    font-size: 11px;
    opacity: 0.8;
}

.s1-section-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    padding-left: 8px;
}

.s1-section-card-body {
    padding: 12px;
}

.s1-section-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.s1-section-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.s1-section-leader {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.s1-section-card-actions {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

/* Panel Header (for all tabs) */
.s1-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.s1-panel-header h2 {
    margin: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.s1-panel-actions {
    display: flex;
    gap: 8px;
}

/* Filter Bar */
.s1-filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.s1-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.s1-filter-group label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Personnel Grid */
.s1-personnel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.s1-personnel-card {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 12px;
    border-left: 4px solid var(--border-color);
}

.s1-personnel-card.active {
    border-left-color: #10b981;
}

.s1-personnel-card.reserve {
    border-left-color: #6b7280;
}

.s1-personnel-card.resting {
    border-left-color: #3b82f6;
}

.s1-personnel-card.en-route {
    border-left-color: #8b5cf6;
}

.s1-personnel-card.departed {
    border-left-color: #ef4444;
}

.s1-personnel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.s1-personnel-name {
    font-weight: 600;
    font-size: 14px;
}

.s1-personnel-status {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--bg-tertiary);
}

.s1-personnel-info {
    margin-bottom: 8px;
}

.s1-personnel-function {
    font-size: 12px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.s1-personnel-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
    color: var(--text-secondary);
}

.s1-personnel-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.s1-personnel-actions {
    display: flex;
    gap: 4px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

/* Vehicles Grid */
.s1-vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 16px;
}

.s1-vehicle-card {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 12px;
    border-left: 4px solid var(--border-color);
}

.s1-vehicle-card.einsatzbereit { border-left-color: #10b981; }
.s1-vehicle-card.im_raum { border-left-color: #3b82f6; }
.s1-vehicle-card.auf_marsch { border-left-color: #8b5cf6; }
.s1-vehicle-card.bereit { border-left-color: #f59e0b; }

.s1-vehicle-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 8px;
}

.s1-vehicle-symbol {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
    background: var(--bg-tertiary, #2a2a2a);
    border-radius: 4px;
    padding: 3px;
}

.s1-vehicle-callsign {
    font-weight: 600;
    font-size: 14px;
    flex: 1;
}

.s1-vehicle-status {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--bg-tertiary);
}

.s1-vehicle-info {
    margin-bottom: 8px;
}

.s1-vehicle-type {
    font-size: 12px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.s1-vehicle-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
    color: var(--text-secondary);
}

.s1-vehicle-crew {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    padding: 6px 10px;
    background: var(--bg-tertiary);
    border-radius: 6px;
}

.s1-vehicle-crew i {
    font-size: 14px;
}

.s1-vehicle-crew-count {
    font-weight: 600;
    font-size: 14px;
}

.s1-vehicle-crew-label {
    font-size: 11px;
    color: var(--text-muted);
}

.s1-vehicle-crew.crew-complete {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.s1-vehicle-crew.crew-partial {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
}

.s1-vehicle-crew.crew-empty {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.s1-vehicle-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

.s1-vehicle-buttons {
    display: flex;
    gap: 4px;
}

/* Sections Tab - FzfV Panel */
.s1-sections-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.s1-fzfv-panel {
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 2px dashed var(--border-color);
}

.s1-fzfv-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.s1-fzfv-header h3 {
    margin: 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.s1-fzfv-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    min-height: 60px;
}

/* Sections Drag Grid */
.s1-sections-drag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.s1-section-panel {
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.s1-section-panel-header {
    padding: 10px 12px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.s1-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.s1-section-panel-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}

/* Info-Button auf farbigem Header */
.s1-section-panel-actions .section-contacts-info-btn {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.s1-section-panel-actions .section-contacts-info-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.5);
}

.s1-section-vehicles {
    padding: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 60px;
}

/* Vehicle Badge */
.s1-vehicle-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    border: 1px solid var(--border-color);
    cursor: grab;
}

.s1-vehicle-badge .s1-vehicle-callsign {
    font-size: 12px;
    font-weight: 600;
}

.s1-vehicle-badge .s1-vehicle-type {
    font-size: 10px;
    color: var(--text-secondary);
}

.s1-vehicle-badge.einsatzbereit { background: rgba(16, 185, 129, 0.15); border-color: #10b981; }
.s1-vehicle-badge.im_raum { background: rgba(59, 130, 246, 0.15); border-color: #3b82f6; }
.s1-vehicle-badge.auf_marsch { background: rgba(139, 92, 246, 0.15); border-color: #8b5cf6; }
.s1-vehicle-badge.bereit { background: rgba(245, 158, 11, 0.15); border-color: #f59e0b; }
.s1-vehicle-badge.angefordert { background: rgba(245, 158, 11, 0.15); border-color: #f59e0b; }
.s1-vehicle-badge.abgerueckt { background: rgba(107, 114, 128, 0.15); border-color: #6b7280; }

/* External Badge marker */
.s1-vehicle-badge.external {
    border-width: 2px;
    border-style: dashed;
    position: relative;
}

.s1-vehicle-badge.external .s1-external-marker {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ef4444;
    color: white;
    font-size: 8px;
    font-weight: 700;
    padding: 2px 4px;
    border-radius: 3px;
    line-height: 1;
}

/* Section vehicle count badge */
.s1-section-vehicle-count {
    background: rgba(255, 255, 255, 0.25);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

/* External Status Modal */
.s1-status-modal-content {
    text-align: center;
}

.s1-status-modal-info {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.s1-status-modal-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.s1-status-modal-details {
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.s1-status-modal-details span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.s1-status-modal-section {
    font-size: 12px;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.s1-status-modal-current {
    font-size: 13px;
    color: var(--text-secondary);
}

.s1-status-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.s1-status-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.s1-status-btn:hover {
    background: var(--bg-tertiary);
}

.s1-status-btn.active {
    border-width: 3px;
}

.s1-status-btn i {
    font-size: 20px;
}

.s1-status-btn span {
    font-size: 12px;
    font-weight: 600;
}

.s1-status-btn.angefordert {
    border-color: #f59e0b;
    color: #f59e0b;
}
.s1-status-btn.angefordert.active {
    background: rgba(245, 158, 11, 0.15);
}

.s1-status-btn.auf_marsch {
    border-color: #8b5cf6;
    color: #8b5cf6;
}
.s1-status-btn.auf_marsch.active {
    background: rgba(139, 92, 246, 0.15);
}

.s1-status-btn.im_raum {
    border-color: #10b981;
    color: #10b981;
}
.s1-status-btn.im_raum.active {
    background: rgba(16, 185, 129, 0.15);
}

.s1-status-btn.abgerueckt {
    border-color: #6b7280;
    color: #6b7280;
}
.s1-status-btn.abgerueckt.active {
    background: rgba(107, 114, 128, 0.15);
}

/* External Forces Grid */
.s1-external-card {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 12px;
    border-left: 4px solid var(--border-color);
}

.s1-external-card.requested { border-left-color: #f59e0b; }
.s1-external-card.en_route { border-left-color: #8b5cf6; }
.s1-external-card.arrived { border-left-color: #10b981; }
.s1-external-card.departed { border-left-color: #6b7280; }

.s1-external-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.s1-external-org {
    font-weight: 600;
    font-size: 14px;
}

.s1-external-status {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--bg-tertiary);
}

.s1-external-info {
    margin-bottom: 8px;
}

.s1-external-counts {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--text-secondary);
}

.s1-external-eta {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.s1-external-notes {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-style: italic;
}

.s1-external-actions {
    display: flex;
    gap: 4px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

/* ==================== PERSONNEL TABLE/LIST VIEW ==================== */

.s1-personnel-table {
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.s1-personnel-table-header {
    display: grid;
    grid-template-columns: 2fr 100px 1.2fr 1.8fr 1.2fr 120px;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
}

.s1-personnel-table-body {
    display: flex;
    flex-direction: column;
}

.s1-personnel-row {
    display: grid;
    grid-template-columns: 2fr 100px 1.2fr 1.8fr 1.2fr 120px;
    gap: 12px;
    padding: 12px 16px;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.s1-personnel-row:last-child {
    border-bottom: none;
}

.s1-personnel-row:hover {
    background: var(--bg-tertiary);
}

.s1-personnel-col-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.s1-personnel-col-name i {
    color: var(--primary-color);
    font-size: 14px;
}

.s1-personnel-col-org {
    font-size: 13px;
    color: var(--text-secondary);
}

.s1-personnel-col-quals {
    font-size: 12px;
}

.s1-quals-list {
    display: inline-block;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.s1-personnel-col-contact {
    font-size: 13px;
}

.s1-personnel-col-hours {
    font-size: 13px;
    text-align: center;
}

.s1-personnel-col-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.s1-no-data {
    color: var(--text-muted, #6b7280);
    font-style: italic;
}

/* Personnel Status Badge */
.s1-personnel-col-status {
    display: flex;
    align-items: center;
}

.s1-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.s1-status-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.s1-status-badge.status-available {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.s1-status-badge.status-deployed {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.s1-status-badge.status-break {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.s1-status-badge.status-absent {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

.s1-status-badge.status-unknown {
    background: rgba(107, 114, 128, 0.1);
    color: #9ca3af;
}

/* Personnel Status Modal */
#s1-personnel-status-modal .modal-content {
    max-width: 400px;
}

#s1-personnel-status-modal .s1-status-modal-content {
    padding: 8px 0;
}

#s1-personnel-status-modal .s1-status-modal-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 16px;
}

#s1-personnel-status-modal .s1-status-modal-info i {
    font-size: 24px;
    color: var(--primary);
}

#s1-personnel-status-modal .s1-status-modal-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

#s1-personnel-status-modal .s1-status-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

#s1-personnel-status-modal .s1-status-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    cursor: pointer;
    transition: all 0.2s;
}

#s1-personnel-status-modal .s1-status-option:hover {
    border-color: var(--status-color);
    background: color-mix(in srgb, var(--status-color) 10%, transparent);
}

#s1-personnel-status-modal .s1-status-option.active {
    border-color: var(--status-color);
    background: color-mix(in srgb, var(--status-color) 15%, transparent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--status-color) 20%, transparent);
}

#s1-personnel-status-modal .s1-status-option i {
    font-size: 24px;
    color: var(--status-color);
}

#s1-personnel-status-modal .s1-status-option span {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Responsive: Stack on smaller screens */
@media (max-width: 1024px) {
    .s1-personnel-table-header {
        display: none;
    }

    .s1-personnel-row {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 16px;
    }

    .s1-personnel-row > div {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .s1-personnel-row > div::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 11px;
        color: var(--text-secondary);
        min-width: 100px;
    }

    .s1-personnel-col-actions {
        justify-content: flex-start;
        padding-top: 8px;
        border-top: 1px solid var(--border-color);
    }
}

/* ==================== QUALIFICATION CHECKBOXES ==================== */

.s1-quals-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.s1-qual-checkbox {
    display: inline-flex;
    cursor: pointer;
}

.s1-qual-checkbox input[type="checkbox"] {
    display: none;
}

.s1-qual-label {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    border: 2px solid;
    transition: all 0.2s;
    user-select: none;
}

.s1-qual-checkbox input[type="checkbox"]:not(:checked) + .s1-qual-label {
    opacity: 0.6;
}

.s1-qual-checkbox input[type="checkbox"]:checked + .s1-qual-label {
    opacity: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.s1-qual-checkbox:hover .s1-qual-label {
    opacity: 1;
    transform: translateY(-1px);
}

.s1-no-quals-hint {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    padding: 8px;
}

.s1-no-quals-hint a {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Staff Shifts Grid */
.s1-staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
}

.s1-staff-card {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.2s ease;
}

.s1-staff-card.vacant {
    border: 2px dashed var(--border-color);
    opacity: 0.8;
}

.s1-staff-card.assigned {
    border: 1px solid #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.s1-staff-card.overtime {
    border: 2px solid #ef4444 !important;
    background: rgba(239, 68, 68, 0.08) !important;
    animation: pulse-warning 2s infinite;
}

.s1-staff-card.expired {
    border-color: #f59e0b !important;
    background: rgba(245, 158, 11, 0.08) !important;
}

@keyframes pulse-warning {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

.s1-staff-function {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.s1-staff-function i {
    width: 20px;
    text-align: center;
    color: var(--primary);
}

.s1-staff-assignment {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.s1-staff-person-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.s1-staff-person-info.warning {
    color: #ef4444;
}

.s1-staff-person-info.soon {
    color: #f59e0b;
}

.s1-staff-person-name {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.s1-staff-person-name strong {
    font-size: 13px;
    color: var(--text-primary);
}

.s1-staff-quals {
    font-size: 11px;
    color: var(--text-secondary);
}

.s1-staff-shift-times {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.s1-shift-time {
    display: flex;
    align-items: center;
    gap: 4px;
}

.s1-shift-time i {
    font-size: 10px;
    opacity: 0.7;
}

.s1-shift-arrow {
    color: var(--text-secondary);
    opacity: 0.5;
}

.s1-shift-remaining,
.s1-shift-warning,
.s1-shift-overtime {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    margin-top: 4px;
}

.s1-shift-remaining {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.s1-shift-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    font-weight: 500;
}

.s1-shift-overtime {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    font-weight: 600;
}

.s1-staff-vacant {
    flex: 1;
    text-align: center;
    padding: 8px 0;
}

.s1-vacant-label {
    color: var(--text-secondary);
    font-size: 12px;
    font-style: italic;
}

.s1-staff-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.s1-staff-actions .btn-icon {
    padding: 6px 8px;
}

.s1-staff-actions .btn-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.s1-staff-actions .btn-warning:hover {
    background: #f59e0b;
    color: white;
}

/* Legacy support */
.s1-staff-person {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

/* Staff Assignment Modal */
#staff-assign-modal .modal-content,
#staff-edit-modal .modal-content {
    max-width: 500px;
}

#staff-assign-modal .s1-form,
#staff-edit-modal .s1-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#staff-assign-modal .form-group,
#staff-edit-modal .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#staff-assign-modal .form-group label,
#staff-edit-modal .form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

#staff-assign-modal .form-group .required,
#staff-edit-modal .form-group .required {
    color: #ef4444;
}

#staff-assign-modal .form-control,
#staff-edit-modal .form-control {
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

#staff-assign-modal .form-control:focus,
#staff-edit-modal .form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#staff-assign-modal select.form-control,
#staff-edit-modal select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

#staff-assign-modal textarea.form-control,
#staff-edit-modal textarea.form-control {
    resize: vertical;
    min-height: 60px;
}

#staff-assign-modal .form-control[readonly],
#staff-edit-modal .form-control[readonly] {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: not-allowed;
}

#staff-assign-modal .form-row,
#staff-edit-modal .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

#staff-assign-modal .text-warning,
#staff-edit-modal .text-warning {
    color: #f59e0b;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

#staff-assign-modal .text-muted,
#staff-edit-modal .text-muted {
    color: var(--text-secondary);
    font-size: 11px;
    margin-top: 4px;
}

/* Searchable Select Dropdown (legacy) */
.s1-searchable-select {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.s1-searchable-select .s1-leader-search {
    font-size: 13px;
    padding: 6px 10px;
}

.s1-searchable-select small {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Leader Picker - Klickbare Liste */
.s1-leader-picker {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.s1-leader-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    min-height: 38px;
}

.s1-leader-selected .s1-leader-name {
    font-weight: 500;
    color: var(--text-primary);
}

.s1-leader-selected .s1-leader-placeholder {
    color: var(--text-muted);
    font-style: italic;
}

.s1-leader-picker .s1-leader-search {
    font-size: 13px;
    padding: 8px 12px;
}

.s1-leader-list {
    max-height: 180px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
}

.s1-leader-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s;
}

.s1-leader-item:last-child {
    border-bottom: none;
}

.s1-leader-item:hover {
    background: var(--bg-hover);
}

.s1-leader-item.selected {
    background: var(--primary-light);
    color: var(--primary);
}

.s1-leader-item.selected .fa-user {
    color: var(--primary);
}

.s1-leader-item .fa-user {
    color: var(--text-muted);
    width: 16px;
}

.s1-leader-item .fa-check {
    margin-left: auto;
    color: var(--primary);
}

.s1-leader-item.s1-leader-empty {
    color: var(--text-muted);
    font-style: italic;
    cursor: default;
}

.s1-leader-item.s1-leader-empty:hover {
    background: transparent;
}

.s1-leader-item.s1-leader-more {
    color: var(--text-secondary);
    font-size: 12px;
    background: var(--bg-secondary);
    cursor: default;
}

.s1-leader-item.s1-leader-more:hover {
    background: var(--bg-secondary);
}

.s1-leader-item.s1-leader-more .fa-search {
    color: var(--text-muted);
}

.s1-leader-picker small {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Leader Type Tabs */
.s1-leader-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 8px;
}

.s1-leader-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s ease;
}

.s1-leader-tab:hover {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
}

.s1-leader-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.s1-leader-tab i {
    font-size: 14px;
}

/* Leader Type Badge */
.s1-leader-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 8px;
}

.s1-leader-type-badge.personnel {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary);
}

.s1-leader-type-badge.vehicle {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.s1-leader-type-badge.external {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

/* Leader Item Info */
.s1-leader-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.s1-leader-item-info span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.s1-leader-item-info small {
    font-size: 11px;
    color: var(--text-muted);
}

.s1-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 250px;
    overflow-y: auto;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
}

.s1-search-dropdown.show {
    display: block;
}

.s1-search-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s;
}

.s1-search-item:last-child {
    border-bottom: none;
}

.s1-search-item:hover {
    background: var(--bg-tertiary);
}

.s1-search-item.selected {
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid var(--primary);
}

.s1-search-item-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.s1-search-item-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.s1-search-item-status {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 500;
}

.s1-search-item-status.status-available {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.s1-search-item-status.status-deployed {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.s1-search-item-status.status-break {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.s1-search-item-status.status-absent {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

.s1-search-item-status.status-unknown {
    background: rgba(107, 114, 128, 0.1);
    color: #9ca3af;
}

.s1-search-item-quals {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.s1-search-empty {
    padding: 16px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    font-style: italic;
}

/* History List */
.s1-history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: calc(100vh - 280px);
    overflow-y: auto;
}

.s1-history-entry {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border-left: 4px solid var(--border-color);
    transition: background-color 0.15s ease;
}

.s1-history-entry:hover {
    background: var(--bg-tertiary);
}

/* Category border colors */
.s1-history-entry.category-personnel { border-left-color: #3b82f6; }
.s1-history-entry.category-vehicle { border-left-color: #f59e0b; }
.s1-history-entry.category-section { border-left-color: #10b981; }
.s1-history-entry.category-staff { border-left-color: #8b5cf6; }
.s1-history-entry.category-external { border-left-color: #ec4899; }

.s1-history-icon {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    font-size: 16px;
    width: 24px;
    padding-top: 2px;
}

.s1-history-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.s1-history-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.s1-history-time {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

.s1-history-category-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.s1-history-category-badge.personnel {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.s1-history-category-badge.vehicle {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.s1-history-category-badge.section {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.s1-history-category-badge.staff {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

.s1-history-category-badge.external {
    background: rgba(236, 72, 153, 0.15);
    color: #ec4899;
}

.s1-history-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.s1-history-subject {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.s1-history-details {
    font-size: 12px;
    color: var(--text-secondary);
}

.s1-history-meta {
    font-size: 11px;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.s1-history-meta i {
    font-size: 10px;
    opacity: 0.7;
}

/* Master Data Tabs */
.s1-masterdata-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.s1-masterdata-tab {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    border-radius: 4px;
}

.s1-masterdata-tab:hover {
    background: var(--bg-tertiary);
}

.s1-masterdata-tab.active {
    background: var(--primary);
    color: white;
}

.s1-masterdata-content {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 16px;
}

.s1-masterdata-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.s1-masterdata-filter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.s1-masterdata-filter label {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.s1-masterdata-filter select {
    min-width: 200px;
}

.s1-masterdata-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.s1-masterdata-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: 6px;
    gap: 16px;
    transition: background-color 0.15s ease;
}

.s1-masterdata-item:hover {
    background: var(--bg-tertiary);
}

.s1-masterdata-item-main {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.s1-masterdata-item-name {
    font-weight: 500;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.s1-masterdata-item-short {
    font-size: 11px;
    color: var(--text-secondary);
}

.s1-masterdata-item-abbr {
    font-weight: 600;
    font-size: 12px;
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    min-width: 50px;
    text-align: center;
}

.s1-masterdata-item-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: flex-start;
}

.s1-masterdata-item-meta span {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.s1-masterdata-item-meta i {
    font-size: 10px;
}

.s1-masterdata-item-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.s1-masterdata-type {
    font-size: 11px;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 4px;
}

.s1-masterdata-count {
    font-size: 11px;
    color: var(--text-secondary);
}

.s1-masterdata-org,
.s1-masterdata-station,
.s1-masterdata-division,
.s1-masterdata-radio,
.s1-masterdata-quals,
.s1-masterdata-plate,
.s1-masterdata-desc {
    font-size: 11px;
    color: var(--text-secondary);
}

/* User account linked badge */
.s1-user-linked {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--success-color, #10b981);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 10px;
    margin-left: 4px;
    cursor: help;
}

.s1-masterdata-user {
    font-size: 11px;
    color: var(--success-color, #10b981);
    font-weight: 500;
}

.s1-masterdata-user i {
    margin-right: 4px;
}

/* User search in modal */
.s1-user-search-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.s1-user-search-row {
    display: flex;
    gap: 8px;
}

.s1-user-search-row input {
    flex: 1;
}

.s1-user-search-row .btn-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
}

/* Selected user display */
.s1-selected-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.08));
    border: 1px solid var(--success-color, #10b981);
    border-radius: 8px;
    color: var(--success-color, #10b981);
    font-weight: 500;
}

.s1-selected-user i {
    font-size: 16px;
}

/* Search results dropdown */
.s1-user-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary, #1e293b);
    border: 1px solid var(--border-color, #334155);
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    margin-top: 4px;
}

.s1-user-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid var(--border-color, #334155);
}

.s1-user-result-item:last-child {
    border-bottom: none;
}

.s1-user-result-item:hover {
    background: var(--bg-tertiary, #334155);
}

.s1-user-result-item i {
    color: var(--text-secondary, #94a3b8);
    width: 20px;
    text-align: center;
}

.s1-user-result-item span {
    flex: 1;
}

.s1-user-result-item small {
    color: var(--text-secondary, #94a3b8);
    font-size: 12px;
}

.s1-user-result-item.s1-no-results {
    color: var(--text-secondary, #94a3b8);
    cursor: default;
    font-style: italic;
}

.s1-user-result-item.s1-no-results:hover {
    background: transparent;
}

.s1-masterdata-actions {
    display: flex;
    gap: 8px;
}

/* CSV Import */
.s1-csv-import-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.s1-csv-info {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 16px;
}

.s1-csv-info h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.s1-csv-info p {
    margin: 0 0 8px 0;
    font-size: 12px;
    color: var(--text-secondary);
}

.s1-csv-info ol {
    margin: 0 0 16px 0;
    padding-left: 20px;
    font-size: 12px;
}

.s1-csv-info li {
    margin-bottom: 4px;
}

.s1-csv-upload h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.s1-file-drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.s1-file-drop-zone:hover {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
}

.s1-file-drop-zone.drag-over {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
}

.s1-file-drop-zone i {
    font-size: 32px;
    color: var(--text-secondary);
}

.s1-file-drop-zone p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.s1-file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.s1-file-info i {
    color: var(--primary);
}

.s1-file-info span {
    flex: 1;
    font-size: 13px;
}

.s1-csv-result {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 16px;
}

.s1-csv-result h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.s1-import-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.s1-import-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
}

.s1-import-stat.success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.s1-import-stat.error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.s1-import-errors {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.s1-import-errors h5 {
    margin: 0 0 8px 0;
    font-size: 12px;
    color: var(--text-secondary);
}

.s1-import-errors ul {
    margin: 0;
    padding-left: 20px;
    font-size: 11px;
    color: var(--text-secondary);
    max-height: 150px;
    overflow-y: auto;
}

.s1-import-errors li {
    margin-bottom: 4px;
}

/* Empty Small */
.s1-empty-small {
    text-align: center;
    color: var(--text-secondary);
    font-size: 12px;
    padding: 16px;
}

/* Status Badges */
.badge-active { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.badge-reserve { background: rgba(107, 114, 128, 0.2); color: #6b7280; }
.badge-resting { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }
.badge-en-route { background: rgba(139, 92, 246, 0.2); color: #8b5cf6; }
.badge-departed { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.badge-einsatzbereit { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.badge-im_raum { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }
.badge-auf_marsch { background: rgba(139, 92, 246, 0.2); color: #8b5cf6; }
.badge-bereit { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.badge-requested { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.badge-en_route { background: rgba(139, 92, 246, 0.2); color: #8b5cf6; }
.badge-arrived { background: rgba(16, 185, 129, 0.2); color: #10b981; }

/* Sync Modal Styles */
.s1-sync-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 60vh;
}

.s1-sync-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    padding: 12px;
}

.s1-sync-info p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.s1-sync-info i {
    color: #3b82f6;
    margin-right: 6px;
}

.s1-sync-actions-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.s1-sync-count {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.s1-sync-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.s1-sync-group {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.s1-sync-group-header {
    background: var(--bg-secondary);
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
}

.s1-sync-group-header label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
}

.s1-sync-group-header i {
    color: var(--text-secondary);
}

.s1-sync-group-items {
    display: flex;
    flex-direction: column;
}

.s1-sync-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.15s ease;
}

.s1-sync-item:last-child {
    border-bottom: none;
}

.s1-sync-item:hover {
    background: rgba(59, 130, 246, 0.05);
}

.s1-sync-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.s1-sync-item-symbol {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
    background: var(--bg-tertiary);
    border-radius: 4px;
    padding: 2px;
}

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

.s1-sync-item-name {
    font-weight: 500;
    font-size: 13px;
    color: var(--text-primary);
}

.s1-sync-item-quals,
.s1-sync-item-type {
    font-size: 11px;
    padding: 2px 6px;
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border-radius: 4px;
}

.s1-sync-item-division,
.s1-sync-item-station,
.s1-sync-item-crew {
    font-size: 11px;
    color: var(--text-secondary);
}

.s1-sync-item-division i,
.s1-sync-item-station i,
.s1-sync-item-crew i {
    margin-right: 4px;
    font-size: 10px;
}

/* Sync Section Styles */
.s1-sync-section {
    margin-bottom: 16px;
}

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

.s1-sync-section-title {
    margin: 0 0 12px 0;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.s1-sync-section-title i {
    color: var(--primary);
}

/* Sync Badges */
.s1-sync-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.s1-sync-badge.new {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.s1-sync-badge.update {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.s1-sync-badge i {
    font-size: 9px;
}

/* Responsive */
@media (max-width: 1200px) {
    .s1-overview-grid {
        grid-template-columns: 1fr;
    }

    .s1-card-wide,
    .s1-card-full,
    .s1-card-warnings {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .s1-tabs {
        flex-wrap: wrap;
    }

    .s1-tab span {
        display: none;
    }

    .s1-filter-bar {
        flex-direction: column;
    }

    .s1-personnel-grid,
    .s1-vehicles-grid,
    .s1-sections-drag-grid,
    .s1-staff-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== SYMBOL PICKER ==================== */

.s1-symbol-picker-group {
    margin-top: 12px;
}

.s1-symbol-selection {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.s1-symbol-preview {
    min-width: 80px;
    min-height: 50px;
    padding: 8px 12px;
    background: var(--bg-tertiary, #2a2a2a);
    border: 1px solid var(--border-color, #3a3a3a);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.s1-symbol-current {
    display: flex;
    align-items: center;
    gap: 10px;
}

.s1-symbol-current img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.s1-symbol-current span {
    font-size: 13px;
    color: var(--text-secondary, #a0a0a0);
}

.s1-no-symbol {
    font-size: 12px;
    color: var(--text-tertiary, #666);
    font-style: italic;
}

.s1-symbol-picker-container {
    margin-top: 12px;
    border: 1px solid var(--border-color, #3a3a3a);
    border-radius: 8px;
    background: var(--bg-tertiary, #2a2a2a);
    max-height: 350px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.s1-symbol-picker-header {
    padding: 10px;
    border-bottom: 1px solid var(--border-color, #3a3a3a);
    background: var(--bg-secondary, #232323);
}

.s1-symbol-picker-header input {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-primary, #1a1a1a);
    border: 1px solid var(--border-color, #3a3a3a);
    border-radius: 4px;
    color: var(--text-primary, #fff);
    font-size: 13px;
}

.s1-symbol-picker-header input:focus {
    outline: none;
    border-color: var(--primary-color, #3b82f6);
}

.s1-symbol-gallery {
    padding: 10px;
    overflow-y: auto;
    max-height: 280px;
}

.s1-symbols-category {
    margin-bottom: 8px;
}

.s1-category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--bg-secondary, #232323);
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary, #a0a0a0);
    transition: background 0.2s;
}

.s1-category-header:hover {
    background: var(--bg-hover, #2f2f2f);
}

.s1-category-header i:first-child {
    color: var(--primary-color, #3b82f6);
    font-size: 12px;
}

.s1-category-count {
    font-size: 11px;
    color: var(--text-tertiary, #666);
    margin-left: auto;
}

.s1-toggle-icon {
    font-size: 10px;
    transition: transform 0.2s;
    margin-left: 4px;
}

.s1-category-header.expanded .s1-toggle-icon {
    transform: rotate(180deg);
}

.s1-symbols-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 8px;
    padding: 10px;
    background: var(--bg-primary, #1a1a1a);
    border-radius: 0 0 4px 4px;
}

.s1-symbol-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
    background: var(--bg-tertiary, #2a2a2a);
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.s1-symbol-item:hover {
    background: var(--bg-hover, #333);
    border-color: var(--border-color, #3a3a3a);
}

.s1-symbol-item.selected {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--primary-color, #3b82f6);
}

.s1-symbol-item img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-bottom: 4px;
}

.s1-symbol-item .s1-symbol-name {
    font-size: 10px;
    color: var(--text-tertiary, #888);
    text-align: center;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==================== Vehicle Groups Modal ==================== */

.s1-groups-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.s1-groups-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.s1-groups-header h3 {
    margin: 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.s1-groups-header .btn {
    flex-shrink: 0;
    width: auto;
}

.s1-groups-description {
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.s1-groups-description p {
    margin: 0;
}

.s1-groups-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 500px;
    overflow-y: auto;
}

.s1-group-card {
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.s1-group-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-left: 4px solid #6366f1;
    cursor: pointer;
    transition: background 0.2s;
}

.s1-group-card-header:hover {
    background: var(--bg-hover, rgba(255,255,255,0.05));
}

.s1-group-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.s1-group-toggle-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s;
}

.s1-group-card:not(.collapsed) .s1-group-toggle-btn i {
    transform: rotate(90deg);
}

.s1-group-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.s1-group-summary {
    font-size: 12px;
    color: var(--text-secondary);
}

.s1-group-card-content {
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.s1-group-card.collapsed .s1-group-card-content {
    max-height: 0;
}

.s1-group-section-info {
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.s1-group-section-info i {
    margin-right: 6px;
    color: #10b981;
}

.s1-group-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    border-radius: 8px;
    font-size: 16px;
    color: var(--primary-color);
}

.s1-group-info h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
}

.s1-group-desc {
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary);
}

.s1-group-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.s1-group-status-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.s1-group-status.available .s1-group-status-badge {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.s1-group-status.assigned .s1-group-status-badge {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.s1-group-section {
    font-size: 11px;
    color: var(--text-secondary);
}

.s1-group-card-body {
    padding: 12px 16px;
}

.s1-group-vehicles label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.s1-group-vehicles-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.s1-group-vehicle-chip {
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    font-size: 12px;
}

.s1-group-no-vehicles {
    font-style: italic;
    color: var(--text-tertiary);
    font-size: 12px;
}

.s1-group-card-actions {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

/* Checkbox List for Vehicle Assignment */
.s1-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
    padding: 8px 0;
}

.s1-checkbox-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}

.s1-checkbox-item:hover {
    background: var(--bg-hover);
}

.s1-checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.s1-checkbox-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.s1-checkbox-label strong {
    font-size: 14px;
}

.s1-checkbox-label small {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Warning and Info Boxes */
.s1-warning-box {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    margin-bottom: 16px;
}

.s1-warning-box i {
    color: #f59e0b;
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.s1-warning-box strong {
    display: block;
    margin-bottom: 8px;
    color: #f59e0b;
}

.s1-warning-box ul {
    margin: 8px 0;
    padding-left: 20px;
}

.s1-warning-box li {
    font-size: 13px;
    margin-bottom: 4px;
}

.s1-warning-box p {
    margin: 8px 0 0 0;
    font-size: 12px;
    color: var(--text-secondary);
}

.s1-info-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    margin-top: 16px;
    font-size: 13px;
}

.s1-info-box i {
    color: #3b82f6;
}

.s1-assign-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.s1-assign-section p {
    margin: 0;
}

/* ==================== DRAG AND DROP STYLES ==================== */

/* Drop zone styling */
.s1-drop-zone {
    min-height: 60px;
    transition: all 0.2s ease;
}

.s1-drop-zone.drop-target-active {
    background: rgba(99, 102, 241, 0.05);
    border: 2px dashed rgba(99, 102, 241, 0.3);
    border-radius: 8px;
}

.s1-drop-zone.drag-over {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--primary-color, #6366f1);
}

.s1-drop-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    color: var(--text-tertiary);
    font-size: 13px;
    font-style: italic;
    min-height: 40px;
}

/* Vehicle badge dragging state */
.s1-vehicle-badge {
    cursor: grab;
    transition: all 0.2s ease;
}

.s1-vehicle-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.s1-vehicle-badge.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.s1-vehicle-badge:active {
    cursor: grabbing;
}

/* Status indicator for vehicles in sections */
.s1-vehicle-status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: absolute;
    top: 4px;
    right: 4px;
}

.s1-vehicle-badge {
    position: relative;
}

.s1-vehicle-badge.auf_marsch .s1-vehicle-status-indicator {
    background: #f59e0b;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.5);
}

.s1-vehicle-badge.im_raum .s1-vehicle-status-indicator {
    background: #10b981;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
}

.s1-vehicle-badge.im_einsatz .s1-vehicle-status-indicator {
    background: #3b82f6;
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.5);
}

.s1-vehicle-badge.nicht_einsatzbereit .s1-vehicle-status-indicator {
    background: #ef4444;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
}

.s1-vehicle-badge.verfuegbar .s1-vehicle-status-indicator {
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

/* ==================== VEHICLE ASSIGN MODAL ==================== */

.s1-assign-status-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.s1-assign-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.s1-assign-vehicle,
.s1-assign-info .s1-assign-section {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.s1-assign-info .s1-assign-section {
    border-left: 3px solid;
}

.s1-assign-arrow {
    color: var(--text-secondary);
    font-size: 18px;
}

.s1-status-selection {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.s1-status-selection > label {
    font-weight: 500;
    font-size: 14px;
}

.s1-status-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.s1-status-options.in-section {
    grid-template-columns: repeat(2, 1fr);
}

.s1-status-options.in-fzfv {
    grid-template-columns: repeat(2, 1fr);
}

.s1-status-option {
    cursor: pointer;
}

/* Button-based status option (used in external assign modal) */
button.s1-status-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.2s ease;
    text-align: center;
    color: var(--text-primary);
}

button.s1-status-option i {
    font-size: 28px;
}

button.s1-status-option span {
    font-weight: 600;
    font-size: 14px;
}

button.s1-status-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

button.s1-status-option.auf_marsch {
    border-color: #8b5cf6;
}

button.s1-status-option.auf_marsch i {
    color: #8b5cf6;
}

button.s1-status-option.auf_marsch:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: #8b5cf6;
}

button.s1-status-option.im_raum {
    border-color: #10b981;
}

button.s1-status-option.im_raum i {
    color: #10b981;
}

button.s1-status-option.im_raum:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10b981;
}

/* External label in assign modal */
.s1-assign-vehicle.external {
    background: rgba(239, 68, 68, 0.1);
    border: 2px dashed #ef4444;
}

.s1-assign-vehicle .s1-ext-label {
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 4px;
    margin-right: 4px;
}

.s1-status-option input[type="radio"] {
    display: none;
}

.s1-status-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s;
    text-align: center;
}

.s1-status-card i {
    font-size: 24px;
}

.s1-status-card span {
    font-weight: 500;
    font-size: 14px;
}

.s1-status-card small {
    font-size: 11px;
    color: var(--text-secondary);
}

.s1-status-option input[type="radio"]:checked + .s1-status-card {
    border-color: var(--primary-color, #6366f1);
    background: rgba(99, 102, 241, 0.1);
}

/* Status card colors */
.s1-status-card.auf_marsch i {
    color: #f59e0b;
}

.s1-status-card.im_raum i {
    color: #10b981;
}

.s1-status-card.im_einsatz i {
    color: #3b82f6;
}

.s1-status-card.nicht_einsatzbereit i {
    color: #ef4444;
}

.s1-status-card.verfuegbar i {
    color: #22c55e;
}

/* ==================== VEHICLE STATUS MODAL ==================== */

.s1-vehicle-status-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.s1-vehicle-status-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.s1-vehicle-status-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.s1-vehicle-status-header > i {
    font-size: 24px;
    color: var(--primary-color, #6366f1);
}

.s1-vehicle-status-header div {
    display: flex;
    flex-direction: column;
}

.s1-vehicle-status-header strong {
    font-size: 16px;
}

.s1-vehicle-status-header span {
    font-size: 13px;
    color: var(--text-secondary);
}

.s1-vehicle-status-section {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
    font-size: 13px;
}

.s1-vehicle-status-section.unassigned {
    color: var(--text-secondary);
    font-style: italic;
}

.s1-vehicle-status-actions {
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.s1-vehicle-status-actions .btn-outline-danger {
    width: 100%;
    background: transparent;
    border: 1px solid #ef4444;
    color: #ef4444;
}

.s1-vehicle-status-actions .btn-outline-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Vehicle badge status colors */
.s1-vehicle-badge.auf_marsch {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.1));
    border-color: rgba(245, 158, 11, 0.4);
}

.s1-vehicle-badge.im_raum {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.1));
    border-color: rgba(16, 185, 129, 0.4);
}

.s1-vehicle-badge.im_einsatz {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.1));
    border-color: rgba(59, 130, 246, 0.4);
}

.s1-vehicle-badge.nicht_einsatzbereit {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.1));
    border-color: rgba(239, 68, 68, 0.4);
}

.s1-vehicle-badge.verfuegbar {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.1));
    border-color: rgba(34, 197, 94, 0.4);
}

/* FzfV panel drop zone */
#fzfv-vehicles.s1-drop-zone {
    min-height: 80px;
    border-radius: 8px;
    padding: 8px;
}

/* ==================== FzfV FILTER STYLES ==================== */

.s1-fzfv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.s1-fzfv-filter-toggle {
    position: relative;
}

.s1-fzfv-filter-toggle.active {
    background: var(--primary-color, #6366f1);
    color: white;
}

.s1-fzfv-filter-toggle.has-filters {
    color: var(--primary-color, #6366f1);
}

.s1-fzfv-filter-toggle .filter-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--primary-color, #6366f1);
    color: white;
    font-size: 10px;
    font-weight: bold;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* FzfV Suchfeld */
.s1-fzfv-search {
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 12px;
}

.s1-fzfv-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.s1-fzfv-search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-secondary);
    font-size: 14px;
    pointer-events: none;
}

.s1-fzfv-search .form-input {
    width: 100%;
    padding: 10px 36px;
    font-size: 14px;
    border-radius: 6px;
}

.s1-fzfv-search-clear {
    position: absolute;
    right: 4px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
}

.s1-fzfv-search-clear:hover {
    color: var(--text-primary);
}

.s1-fzfv-search-hint {
    display: block;
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 12px;
    text-align: center;
}

.s1-fzfv-search-hint.hidden {
    display: none;
}

.s1-fzfv-filters {
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 12px;
}

.s1-fzfv-filter-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.s1-fzfv-filter-row .form-input-small {
    flex: 1;
    min-width: 120px;
    max-width: 180px;
    padding: 6px 10px;
    font-size: 12px;
}

.s1-fzfv-filter-row .btn-icon {
    flex-shrink: 0;
}

.s1-filtered-empty {
    color: var(--text-secondary);
    font-style: italic;
}

.s1-search-hint,
.s1-filtered-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px 16px;
    text-align: center;
}

.s1-search-hint i,
.s1-filtered-empty i {
    font-size: 24px;
    color: var(--text-tertiary);
    opacity: 0.6;
}

.s1-search-hint span,
.s1-filtered-empty span {
    font-size: 14px;
    color: var(--text-secondary);
}

.s1-search-hint small {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* ==================== Crew Modal Styles ==================== */

.s1-crew-modal-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.s1-crew-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.s1-crew-vehicle-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.s1-crew-vehicle-symbol {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.s1-crew-vehicle-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.s1-crew-vehicle-type {
    font-size: 13px;
    color: var(--text-secondary);
}

.s1-crew-stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.s1-crew-count {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.s1-crew-count.complete {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.s1-crew-count.incomplete {
    background: rgba(234, 179, 8, 0.2);
    color: #eab308;
}

.s1-crew-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.s1-crew-section h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.s1-crew-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 10px;
}

.s1-crew-search-box i {
    color: var(--text-muted);
}

.s1-crew-search {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
}

.s1-crew-search::placeholder {
    color: var(--text-muted);
}

.s1-crew-add-form {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.s1-crew-select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 13px;
}

.s1-crew-select[size] {
    flex: 1;
    min-width: 250px;
    height: 140px;
    overflow-y: auto;
}

.s1-crew-select[size] option {
    padding: 6px 10px;
    cursor: pointer;
}

.s1-crew-select[size] option:hover {
    background: var(--bg-tertiary);
}

.s1-crew-select[size] option:checked {
    background: var(--primary-color);
    color: white;
}

.s1-crew-role-add {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
}

.s1-crew-role-add .s1-crew-select {
    width: 100%;
}

.s1-crew-role-add .btn {
    width: 100%;
}

.s1-crew-hint {
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary);
    font-style: italic;
}

.s1-crew-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.s1-crew-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    border-radius: 8px;
    font-style: italic;
}

.s1-crew-member {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.s1-crew-member-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.s1-crew-member-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.s1-crew-member-role {
    display: inline-flex;
    padding: 2px 8px;
    background: var(--primary-color);
    color: white;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    width: fit-content;
}

.s1-crew-member-quals {
    font-size: 11px;
    color: var(--text-secondary);
}

.s1-crew-member-time {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

/* ============================================
   FUNCTIONAL ROLES OVERVIEW (Stab Tab)
   ============================================ */

.s1-roles-info {
    margin-bottom: 16px;
    padding: 12px 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
}

.s1-roles-info p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.s1-roles-info i {
    color: #3b82f6;
}

.s1-roles-total-users {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 12px;
}

.s1-roles-total-users i {
    color: var(--primary-color);
}

.s1-functional-roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.s1-loading {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px;
    color: var(--text-muted);
    font-size: 14px;
}

/* Role Card */
.s1-role-card {
    background: var(--bg-primary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.2s ease;
}

.s1-role-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.s1-role-card.vacant {
    opacity: 0.6;
}

.s1-role-card.vacant:hover {
    opacity: 0.8;
}

.s1-role-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.s1-role-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
}

.s1-role-info {
    flex: 1;
    min-width: 0;
}

.s1-role-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.s1-role-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.s1-role-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.s1-role-badge.exclusive {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.s1-role-badge.multi {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.s1-role-count {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Role Holders */
.s1-role-holders {
    padding: 12px;
    max-height: 280px;
    overflow-y: auto;
}

.s1-role-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: var(--text-muted);
    text-align: center;
}

.s1-role-empty i {
    font-size: 24px;
    margin-bottom: 8px;
    opacity: 0.5;
}

.s1-role-empty span {
    font-size: 13px;
}

/* Holder Item */
.s1-role-holder {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.15s ease;
}

.s1-role-holder:last-child {
    margin-bottom: 0;
}

.s1-role-holder:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
}

.s1-holder-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 0;
}

.s1-holder-info {
    flex: 1 1 150px;
    min-width: 120px;
}

.s1-holder-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.s1-holder-username {
    font-size: 12px;
    color: var(--text-muted);
}

.s1-holder-time {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
    margin-left: auto;
}

.s1-holder-duration {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.s1-holder-duration i {
    font-size: 11px;
    color: var(--primary-color);
}

.s1-holder-since {
    font-size: 11px;
    color: var(--text-muted);
}

/* Duration colors */
.s1-holder-duration.short {
    color: #22c55e;
}

.s1-holder-duration.medium {
    color: #f59e0b;
}

.s1-holder-duration.long {
    color: #ef4444;
}

/* Release button */
.s1-holder-release {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0;
    margin-left: 8px;
}

.s1-role-holder:hover .s1-holder-release {
    opacity: 1;
}

.s1-holder-release:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.s1-holder-release:active {
    transform: scale(0.95);
}

/* Role Card hover state for navigation */
.s1-role-card[data-route]:not(.vacant) .s1-role-card-header {
    cursor: pointer;
}

.s1-role-card[data-route]:not(.vacant) .s1-role-card-header:hover {
    background: var(--bg-secondary);
}

/* Animation for realtime updates */
@keyframes roleUpdatePulse {
    0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

.s1-role-card.updated {
    animation: roleUpdatePulse 0.6s ease-out;
}

.s1-role-holder.new-entry {
    animation: roleUpdatePulse 0.6s ease-out;
    background: rgba(59, 130, 246, 0.1);
}

/* Refresh button spinning */
#btn-refresh-roles.spinning i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==========================================
   Star Button for Role Responsible (Verantwortlicher)
   ========================================== */

/* Hint at top of holders section */
.s1-role-holders-hint {
    font-size: 11px;
    color: var(--text-muted);
    padding: 8px 12px;
    background: rgba(251, 191, 36, 0.05);
    border-bottom: 1px dashed var(--border-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

.s1-role-holders-hint i {
    color: #fbbf24;
    font-size: 12px;
}

/* Star button on each holder */
.s1-holder-star {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #d1d5db;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
    border-radius: 50%;
    flex-shrink: 0;
}

.s1-holder-star:hover {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    transform: scale(1.1);
}

.s1-holder-star.active {
    color: #fbbf24;
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}

.s1-holder-star.active:hover {
    color: #f59e0b;
}

/* Role holder with star - update layout */
.s1-role-holder {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Responsible badge next to name */
.s1-responsible-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    letter-spacing: 0.3px;
}

/* Highlight the responsible holder */
.s1-role-holder.is-responsible {
    background: rgba(251, 191, 36, 0.08);
    border-color: rgba(251, 191, 36, 0.3);
}

.s1-role-holder.is-responsible .s1-holder-avatar {
    box-shadow: 0 0 0 2px #fbbf24;
}

/* Warning when no responsible set */
.s1-no-responsible-hint {
    padding: 8px 12px;
    background: rgba(245, 158, 11, 0.1);
    border-top: 1px dashed rgba(245, 158, 11, 0.3);
    font-size: 12px;
    color: #f59e0b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.s1-no-responsible-hint i {
    font-size: 14px;
}

/* Card with responsible has subtle indicator */
.s1-role-card.has-responsible {
    border-color: rgba(251, 191, 36, 0.3);
}

.s1-role-card.has-responsible .s1-role-card-header {
    border-bottom-color: rgba(251, 191, 36, 0.2);
}

/* ===== S1 Subsections (Unterabschnitte) - Collapsible ===== */

/* Wrapper für jeden Abschnitt (für ausklappbare Unterabschnitte) */
.s1-section-wrapper {
    display: flex;
    flex-direction: column;
}

/* Ausgeklappter Wrapper nimmt volle Breite ein */
.s1-section-wrapper.s1-wrapper-expanded {
    grid-column: 1 / -1;
}

/* Collapsible Subsections Container */
.s1-subsections-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(var(--bg-secondary-rgb, 30, 41, 59), 0.5);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out, padding 0.3s ease-out;
    max-height: 1000px;
    opacity: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.s1-subsections-container.s1-subsections-collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    border: none;
    box-shadow: none;
}

.s1-subsection-panel {
    position: relative;
    border-left-width: 3px !important;
    background: var(--bg-secondary);
}

.s1-subsection-panel::before {
    display: none;
}

.s1-subsection-header {
    padding: 8px 12px !important;
    font-size: 13px;
}

.s1-subsection-header .s1-section-title span:first-child {
    font-size: 13px;
}

.s1-subsection-icon {
    font-size: 10px;
    margin-right: 4px;
    opacity: 0.8;
    transform: rotate(90deg);
    display: inline-block;
}

.s1-subsection-panel .s1-section-vehicles {
    min-height: 50px;
    padding: 8px;
}

.s1-subsection-panel .s1-drop-placeholder {
    font-size: 11px;
    padding: 10px;
}

/* Parent section indicator for subsections */
.s1-parent-section {
    font-weight: 400;
    opacity: 0.85;
    font-size: 0.9em;
    margin-left: 2px;
}

/* ===== Collapsible Section Toggle Button ===== */

.s1-section-toggle {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.s1-section-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.s1-section-toggle i {
    font-size: 0.7rem;
    color: white;
    transition: transform 0.3s ease;
}

.s1-section-toggle.expanded i {
    transform: rotate(90deg);
}

.s1-subsection-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.25rem;
    font-size: 0.65rem;
    font-weight: 600;
    color: inherit;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 8px;
}

/* Section panel expanded state */
.s1-section-panel.s1-section-expanded {
    border-radius: 8px 8px 0 0;
}

@media (max-width: 768px) {
    .s1-subsections-container {
        grid-template-columns: 1fr;
    }
}

/* ============================================ */
/* Section Dashboard Management Styles         */
/* ============================================ */

.s1-section-dashboard-mgmt {
    margin-bottom: 1rem;
}

.s1-section-dashboard-mgmt .s1-card-hint {
    font-size: 0.75rem;
    color: var(--text-muted, #64748b);
    margin-left: auto;
}

.s1-section-dashboard-table {
    width: 100%;
    border-collapse: collapse;
}

.s1-section-dashboard-table th,
.s1-section-dashboard-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color, #334155);
}

.s1-section-dashboard-table th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted, #64748b);
    background: var(--bg-tertiary, #0f172a);
}

.s1-section-dashboard-table tbody tr:hover {
    background: var(--bg-secondary, #1e293b);
}

/* Toggle Switch */
.s1-toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.s1-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.s1-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-tertiary, #0f172a);
    border: 1px solid var(--border-color, #334155);
    transition: 0.3s;
    border-radius: 24px;
}

.s1-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: #64748b;
    transition: 0.3s;
    border-radius: 50%;
}

.s1-toggle-switch input:checked + .s1-toggle-slider {
    background-color: var(--primary, #3b82f6);
    border-color: var(--primary, #3b82f6);
}

.s1-toggle-switch input:checked + .s1-toggle-slider:before {
    transform: translateX(20px);
    background-color: white;
}

.s1-toggle-switch input:focus + .s1-toggle-slider {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

/* User Count Badge */
.s1-user-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    background: var(--bg-tertiary, #0f172a);
    border: 1px solid var(--border-color, #334155);
    color: var(--text-primary, #f1f5f9);
    border-radius: 14px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Section Assigned Users List */
.section-assigned-users-list {
    max-height: 200px;
    overflow-y: auto;
}

/* Organization Hierarchy Styles */
.s1-masterdata-item-child {
    padding-left: 32px;
    background: var(--bg-tertiary);
    border-left: 3px solid var(--primary, #3b82f6);
}

.s1-masterdata-item-child .s1-masterdata-item-main::before {
    content: none;
}

.s1-child-icon {
    font-size: 10px;
    color: var(--primary, #3b82f6);
    margin-right: 8px;
}

.s1-kats-badge {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    margin-left: 8px;
}

.s1-checkbox-group {
    padding: 10px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    margin-top: 4px;
}

.s1-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
}

.s1-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
}

.s1-checkbox-text {
    display: flex;
    align-items: center;
    gap: 6px;
}

.s1-checkbox-text i {
    color: #ef4444;
}

.s1-checkbox-group .form-hint {
    margin-top: 6px;
    display: block;
}

.s1-parent-badge {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
    margin-left: 8px;
}

.s1-org-children-count {
    font-size: 11px;
    color: var(--text-secondary);
    margin-left: 4px;
}

.s1-org-children-count i {
    margin-right: 4px;
}

/* ========================================
   Anforderungen Tab - Create Request Panel
   ======================================== */

.s1-create-request-panel {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05));
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 16px 20px;
}

.s1-create-request-panel .s1-panel-header {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.s1-create-request-panel .s1-panel-header h2 {
    font-size: 1rem;
    color: var(--primary-color, #3b82f6);
}

.s1-create-request-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.s1-create-request-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 13px;
    flex: 1;
}

.s1-create-request-content .btn-lg {
    padding: 10px 20px;
    font-size: 14px;
    white-space: nowrap;
    width: auto;
}

/* ========================================
   Anforderungen Tab - Kanban Board
   ======================================== */

.s1-requests-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 16px;
}

.s1-requests-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 13px;
}

.s1-requests-info i {
    color: var(--primary-color, #3b82f6);
    margin-right: 8px;
}

.s1-requests-kanban {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.s1-requests-column {
    display: flex;
    flex-direction: column;
    background: var(--bg-tertiary);
    border-radius: 8px;
    overflow: hidden;
    min-height: 0;
}

.s1-requests-column-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    font-weight: 600;
    font-size: 13px;
    color: #fff;
    flex-shrink: 0;
}

.s1-requests-column-header.requested {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.s1-requests-column-header.approved {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.s1-requests-column-header.in-transit {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.s1-requests-column-header.delivered {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.s1-requests-count {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.25);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.s1-requests-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Request Card */
.s1-request-card {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.s1-request-card:hover {
    border-color: var(--primary-color, #3b82f6);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.s1-request-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.s1-request-title {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    flex: 1;
    margin-right: 8px;
}

.s1-request-priority {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.s1-request-priority.urgent {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.s1-request-priority.high {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
}

.s1-request-priority.normal {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.s1-request-priority.low {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

.s1-request-source {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.s1-request-source i {
    color: var(--primary-color, #3b82f6);
}

.s1-request-quantity {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color, #3b82f6);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

.s1-request-quantity i {
    font-size: 11px;
}

.s1-request-description {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.4;
}

.s1-request-time {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.s1-request-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.s1-request-actions .btn {
    padding: 4px 10px;
    font-size: 11px;
}

.s1-request-actions .btn-approve {
    background: #3b82f6;
    color: #fff;
}

.s1-request-actions .btn-approve:hover {
    background: #2563eb;
}

.s1-request-actions .btn-transit {
    background: #8b5cf6;
    color: #fff;
}

.s1-request-actions .btn-transit:hover {
    background: #7c3aed;
}

.s1-request-actions .btn-deliver {
    background: #22c55e;
    color: #fff;
}

.s1-request-actions .btn-deliver:hover {
    background: #16a34a;
}

.s1-request-actions .btn-reject {
    background: #ef4444;
    color: #fff;
}

.s1-request-actions .btn-reject:hover {
    background: #dc2626;
}

/* Empty state */
.s1-requests-empty {
    text-align: center;
    padding: 24px 12px;
    color: var(--text-secondary);
}

.s1-requests-empty i {
    font-size: 28px;
    margin-bottom: 10px;
    opacity: 0.5;
}

.s1-requests-empty span {
    display: block;
    font-size: 12px;
}

/* Request Badge in Tab */
.s1-request-badge {
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 6px;
}

/* Responsive */
@media (max-width: 1200px) {
    .s1-requests-kanban {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .s1-requests-kanban {
        grid-template-columns: 1fr;
    }
}

/* ===== Section Type Selector ===== */
.s1-section-type-selector {
    background: var(--bg-tertiary, #1e293b);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color, #334155);
}

.s1-section-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.s1-section-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    background: var(--bg-secondary, #0f172a);
    border: 2px solid var(--border-color, #334155);
    border-radius: 10px;
    color: var(--text-primary, #f8fafc);
    cursor: pointer;
    transition: all 0.2s ease;
}

.s1-section-type-btn i {
    font-size: 1.75rem;
    color: #3b82f6;
}

.s1-section-type-btn span {
    font-size: 0.9rem;
    font-weight: 500;
}

.s1-section-type-btn:hover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.s1-section-type-btn.bereitstellung i {
    color: #22c55e;
}

.s1-section-type-btn.bereitstellung:hover {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.s1-section-type-btn.versorgung i {
    color: #f59e0b;
}

.s1-section-type-btn.versorgung:hover {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

/* Section Type Badge in Modal */
.s1-section-type-badge-row {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.s1-section-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.s1-section-type-badge.bereitstellungsraum {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.3);
}

.s1-section-type-badge.versorgungsraum {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.3);
}

/* Section Type Selector in Modal */
.s1-section-type-selector-modal {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.s1-section-type-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 10px;
    background: var(--bg-secondary, #0f172a);
    border: 2px solid var(--border-color, #334155);
    border-radius: 8px;
    color: var(--text-primary, #f8fafc);
    cursor: pointer;
    transition: all 0.2s ease;
}

.s1-section-type-option i {
    font-size: 1.4rem;
    color: #3b82f6;
}

.s1-section-type-option span {
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
}

.s1-section-type-option:hover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.s1-section-type-option.active {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.15);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.s1-section-type-option.bereitstellung i {
    color: #22c55e;
}

.s1-section-type-option.bereitstellung:hover {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.s1-section-type-option.bereitstellung.active {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.15);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.s1-section-type-option.versorgung i {
    color: #f59e0b;
}

.s1-section-type-option.versorgung:hover {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.s1-section-type-option.versorgung.active {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

@media (max-width: 600px) {
    .s1-section-type-grid {
        grid-template-columns: 1fr;
    }

    .s1-section-type-selector-modal {
        grid-template-columns: 1fr;
    }
}

/* ===== Section Modal with Map ===== */

#s1-section-modal {
    display: none;
}

.s1-section-modal-wide {
    max-width: 1000px !important;
    width: 95%;
}

.s1-section-modal-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 1.5rem;
    min-height: 400px;
}

.s1-section-form-column {
    display: flex;
    flex-direction: column;
}

.s1-section-map-column {
    display: flex;
    flex-direction: column;
}

.s1-section-map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.s1-section-map-header label {
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.s1-section-map-header label i {
    color: #3b82f6;
}

.s1-section-map-tools {
    display: flex;
    gap: 0.25rem;
}

.s1-section-map-tools .btn-sm {
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
}

.s1-section-map-tools .btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.s1-section-map-tools .btn-outline:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    color: #3b82f6;
}

.s1-section-map-tools .btn-outline.active {
    background: rgba(59, 130, 246, 0.15);
    border-color: #3b82f6;
    color: #3b82f6;
}

.s1-section-map-tools .btn-danger {
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.s1-section-map-tools .btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
}

.s1-section-map-tools .btn-outline.disabled,
.s1-section-map-tools .btn-outline[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.s1-section-map-tools .btn-danger.disabled,
.s1-section-map-tools .btn-danger[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.s1-tool-separator {
    display: inline-block;
    width: 1px;
    height: 20px;
    background: var(--border-color);
    margin: 0 0.25rem;
    vertical-align: middle;
}

/* Radius-Eingabe für Kreise */
.s1-section-radius-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.s1-section-radius-input label {
    font-size: 0.85rem;
    white-space: nowrap;
}

.s1-section-radius-input .form-input {
    width: 100px;
    padding: 0.35rem 0.5rem;
    font-size: 0.85rem;
}

.s1-section-map-container {
    flex: 1;
    min-height: 300px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    position: relative;
    background: var(--bg-tertiary, #1e293b);
}

.s1-section-map-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    gap: 0.5rem;
}

.s1-section-map-placeholder i {
    font-size: 2rem;
    opacity: 0.5;
}

/* Map inside modal */
#s1-section-map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Leaflet Draw Toolbar Styling */
.s1-section-map-container .leaflet-draw-toolbar a {
    background-color: var(--bg-secondary, #1e293b);
    border-color: var(--border-color);
}

.s1-section-map-container .leaflet-draw-toolbar a:hover {
    background-color: rgba(59, 130, 246, 0.2);
}

/* Responsive */
@media (max-width: 900px) {
    .s1-section-modal-layout {
        grid-template-columns: 1fr;
    }

    .s1-section-map-column {
        order: -1;
    }

    .s1-section-map-container {
        min-height: 250px;
    }
}


/* ============ Stab-Tab Styles (Benutzer-Sidebar & Drag & Drop) ============ */

/* Layout Container */
.s1-stab-layout {
    display: flex;
    gap: 16px;
    height: 100%;
    overflow: hidden;
}

/* Sidebar */
.s1-stab-sidebar {
    width: 320px;
    min-width: 320px;
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease, min-width 0.3s ease;
    overflow: hidden;
}

.s1-stab-sidebar.collapsed {
    width: 48px;
    min-width: 48px;
}

.s1-stab-sidebar.collapsed .s1-stab-sidebar-search,
.s1-stab-sidebar.collapsed .s1-stab-sidebar-content,
.s1-stab-sidebar.collapsed .s1-stab-sidebar-footer,
.s1-stab-sidebar.collapsed .s1-stab-sidebar-header h3 {
    display: none;
}

.s1-stab-sidebar.collapsed .s1-stab-sidebar-header {
    justify-content: center;
    padding: 12px 8px;
}

.s1-stab-sidebar.collapsed #btn-toggle-sidebar i {
    transform: rotate(180deg);
}

.s1-stab-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(59, 130, 246, 0.1);
}

.s1-stab-sidebar-header h3 {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.s1-stab-sidebar-header h3 i {
    color: var(--primary);
}

.s1-stab-sidebar-search {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.s1-stab-sidebar-search .search-input-wrapper {
    position: relative;
}

.s1-stab-sidebar-search .search-input-wrapper i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.s1-stab-sidebar-search .form-input {
    width: 100%;
    padding-left: 32px;
    font-size: 0.85rem;
}

.s1-stab-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.s1-stab-sidebar-footer {
    padding: 8px 16px;
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
}

/* User List Items */
.s1-stab-user-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 4px;
    background: var(--bg-secondary);
    border-radius: 6px;
    cursor: grab;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.s1-stab-user-item:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary);
}

.s1-stab-user-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.s1-stab-user-item .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #1e40af);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.s1-stab-user-item .user-info {
    flex: 1;
    min-width: 0;
}

.s1-stab-user-item .user-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.s1-stab-user-item .user-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.s1-stab-user-item .user-role-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    background: rgba(107, 114, 128, 0.2);
    color: var(--text-secondary);
}

.s1-stab-user-item .user-role-badge.assigned {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.s1-stab-user-item .drag-handle {
    color: var(--text-secondary);
    opacity: 0.5;
    font-size: 0.9rem;
}

/* Main Content Area */
.s1-stab-main {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Drop Zone Container */
.s1-drop-zone-container {
    position: relative;
}

/* Functional Role Cards as Drop Zones */
.s1-functional-roles-grid .s1-role-card {
    transition: all 0.2s ease;
    border: 2px solid transparent;
    position: relative;
}

.s1-functional-roles-grid .s1-role-card.drag-over {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.15) !important;
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.s1-functional-roles-grid .s1-role-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    transition: opacity 0.2s ease;
    opacity: 0;
}

.s1-functional-roles-grid .s1-role-card.drag-over::after {
    opacity: 1;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.1), transparent 70%);
}

/* Drop Indicator */
.s1-drop-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 10;
    pointer-events: none;
}

.s1-functional-roles-grid .s1-role-card.drag-over .s1-drop-indicator {
    display: flex;
}

/* Sections Category */
.s1-stab-sections {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 16px;
    border: 1px solid var(--border-color);
}

.s1-sections-category {
    margin-bottom: 20px;
}

.s1-sections-category:last-child {
    margin-bottom: 0;
}

.s1-sections-category h4 {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.s1-sections-category h4 i {
    width: 20px;
    text-align: center;
}

#sections-einsatzabschnitte h4 { color: #3b82f6; }
#sections-bereitstellungsraeume h4 { color: #22c55e; }
#sections-versorgungsraeume h4 { color: #f59e0b; }

.s1-sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.s1-no-sections {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-style: italic;
}

/* Section Card (as Drop Zone) */
.s1-section-drop-card {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 14px;
    border: 2px solid var(--border-color);
    transition: all 0.2s ease;
    cursor: pointer;
}

.s1-section-drop-card:hover {
    border-color: var(--primary);
}

.s1-section-drop-card.drag-over {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.15);
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.25);
}

.s1-section-drop-card .section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.s1-section-drop-card .section-color {
    width: 8px;
    height: 32px;
    border-radius: 4px;
    flex-shrink: 0;
}

.s1-section-drop-card .section-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.s1-section-drop-card .section-stats {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.s1-section-drop-card .section-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.s1-section-drop-card .section-leader {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 6px;
    font-size: 0.8rem;
}

.s1-section-drop-card .section-leader i {
    color: #10b981;
}

.s1-section-drop-card .section-leader .leader-name {
    color: var(--text-primary);
    font-weight: 500;
}

.s1-section-drop-card .section-no-leader {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(107, 114, 128, 0.1);
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border: 1px dashed var(--border-color);
}

.s1-section-drop-card .section-no-leader i {
    color: var(--text-secondary);
}

.s1-section-drop-card .dashboard-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    background: rgba(59, 130, 246, 0.2);
    color: var(--primary);
    border-radius: 4px;
    font-size: 0.7rem;
    margin-left: auto;
}

/* Confirmation Modal for Exclusive Roles */
.s1-confirm-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.s1-confirm-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.s1-confirm-modal {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 24px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.2s ease;
}

.s1-confirm-modal-overlay.active .s1-confirm-modal {
    transform: scale(1);
}

.s1-confirm-modal h3 {
    margin: 0 0 12px 0;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.s1-confirm-modal h3 i {
    color: #f59e0b;
}

.s1-confirm-modal p {
    margin: 0 0 20px 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.s1-confirm-modal .modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* User Selection Modal for Click Assignment */
.s1-user-select-modal {
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.s1-user-select-modal .user-list {
    max-height: 400px;
    overflow-y: auto;
    margin: 12px 0;
}

.s1-user-select-modal .user-select-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.s1-user-select-modal .user-select-item:hover {
    background: rgba(59, 130, 246, 0.1);
}

.s1-user-select-modal .user-select-item .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #1e40af);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    flex-shrink: 0;
}

.s1-user-select-modal .user-select-item .user-info {
    flex: 1;
}

.s1-user-select-modal .user-select-item .user-name {
    font-weight: 500;
    color: var(--text-primary);
}

.s1-user-select-modal .user-select-item .user-current-role {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Responsive Stab Layout */
@media (max-width: 900px) {
    .s1-stab-layout {
        flex-direction: column;
    }

    .s1-stab-sidebar {
        width: 100%;
        min-width: unset;
        max-height: 300px;
    }

    .s1-stab-sidebar.collapsed {
        width: 100%;
        min-width: unset;
        max-height: 48px;
    }

    .s1-sections-grid {
        grid-template-columns: 1fr;
    }
}
