* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* Notification Banner */
.notification-banner {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    min-width: 300px;
    max-width: 600px;
    padding: 1rem 2rem;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    display: none;
    font-weight: 500;
    animation: slideDown 0.3s ease-out;
}

.notification-banner.show {
    display: block;
}

.notification-banner.success {
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
}

.notification-banner.error {
    background: linear-gradient(135deg, #f44336, #da190b);
    color: white;
}

.notification-banner.info {
    background: linear-gradient(135deg, #2196F3, #0b7dda);
    color: white;
}

.notification-banner.warning {
    background: linear-gradient(135deg, #ff9800, #e68900);
    color: white;
}

@keyframes slideDown {
    from {
        transform: translate(-50%, -100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.header-left {
    flex: 1;
}

.header-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
    padding-left: 20px;
}

.header-logo img {
    max-width: 150px;
    height: auto;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9em;
}

.btn-logout {
    background: rgba(231, 76, 60, 0.3);
    color: white;
    border: 2px solid rgba(231, 76, 60, 0.5);
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: rgba(231, 76, 60, 0.6);
    border-color: rgba(231, 76, 60, 0.8);
}

header h1 {
    margin-bottom: 20px;
    font-size: 2em;
}

nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tab-button {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s;
}

.tab-button:hover {
    background: rgba(255,255,255,0.3);
}

.tab-button.active {
    background: white;
    color: #667eea;
    border-color: white;
}

.tab-button.register-link {
    text-decoration: none;
    display: inline-block;
    background: rgba(46, 125, 50, 0.3);
    border-color: rgba(76, 175, 80, 0.5);
}

.tab-button.register-link:hover {
    background: rgba(76, 175, 80, 0.5);
    border-color: rgba(129, 199, 132, 0.8);
}

main {
    padding: 30px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-group label {
    font-weight: 600;
    color: #333;
}

.control-group select {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    min-width: 250px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
    padding: 5px 10px;
    font-size: 0.9em;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-edit {
    background: #ffc107;
    color: #333;
    padding: 5px 10px;
    font-size: 0.9em;
}

.btn-edit:hover {
    background: #e0a800;
}

/* Planungsbereich */
.planung-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    min-height: 600px;
}

.verfuegbare-personen {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.verfuegbare-personen h2 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.2em;
}

.personen-liste {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.person-card {
    background: white;
    padding: 12px;
    border-radius: 5px;
    border: 2px solid #ddd;
    cursor: move;
    transition: all 0.2s;
}

.person-card:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.person-card.dragging {
    opacity: 0.5;
}

.person-card .name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.person-card .info {
    font-size: 0.85em;
    color: #666;
}

.person-card .info-small {
    font-size: 0.75em;
    color: #999;
    margin-top: 3px;
    line-height: 1.3;
}

.staende-zuweisungen {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.staende-zuweisungen h2 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.2em;
}

.stand-box {
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.stand-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stand-header h3 {
    font-size: 1.1em;
}

.stand-header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stand-info {
    font-size: 0.9em;
    opacity: 0.9;
}

.btn-stand-folgetage {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-stand-folgetage:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
}

.stand-body {
    padding: 15px;
    min-height: 80px;
}

.drop-zone {
    min-height: 50px;
    transition: all 0.2s;
}

.drop-zone.drag-over {
    background: #e3f2fd;
    border: 2px dashed #667eea;
}

.zugewiesene-personen {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.zugewiesene-person {
    background: #e8f5e9;
    padding: 10px;
    border-radius: 5px;
    border: 2px solid #81c784;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
}

.zugewiesene-person:hover {
    border-color: #66bb6a;
}

.zugewiesene-person.standchef {
    background: #fff3e0;
    border: 2px solid #ffb74d;
}

.zugewiesene-person.standchef .name {
    color: #e65100;
}

.zugewiesene-person.standchef .standchef-badge {
    background: #ff9800;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.75em;
    font-weight: 600;
    margin-left: 8px;
}

.zugewiesene-person .name {
    font-weight: 600;
    color: #2e7d32;
    display: flex;
    align-items: center;
}

.zugewiesene-person .info {
    font-size: 0.85em;
    color: #666;
    margin-top: 2px;
}

.zugewiesene-person .info-small {
    font-size: 0.75em;
    color: #999;
    margin-top: 3px;
    line-height: 1.3;
}

.zugewiesene-person .actions {
    display: flex;
    gap: 5px;
    align-items: center;
}

.zugewiesene-person .standchef-toggle {
    background: transparent;
    border: 1px solid #ff9800;
    color: #ff9800;
    border-radius: 3px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.2s;
}

.zugewiesene-person .standchef-toggle:hover {
    background: #ff9800;
    color: white;
}

.zugewiesene-person.standchef .standchef-toggle {
    background: #ff9800;
    color: white;
}

.zugewiesene-person .remove-btn {
    background: #f44336;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.85em;
}

.zugewiesene-person .remove-btn:hover {
    background: #d32f2f;
}

/* Leere Platzhalter für Personalbedarf */
.platzhalter-person {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 5px;
    border: 2px dashed #ccc;
    color: #999;
    text-align: center;
    font-style: italic;
}

.platzhalter-person:hover {
    background: #eeeeee;
    border-color: #bbb;
}

/* Tabellen */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    font-weight: 600;
}

tbody tr:hover {
    background: #f8f9fa;
}

tbody tr:last-child td {
    border-bottom: none;
}

.actions {
    display: flex;
    gap: 5px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 15px;
}

.form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.form-row .form-group {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    border: 2px solid #ddd;
    max-height: 200px;
    overflow-y: auto;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-item input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.checkbox-item label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.cancel-btn {
    background: #6c757d;
}

.cancel-btn:hover {
    background: #5a6268;
}

/* Responsive */
@media (max-width: 768px) {
    .planung-container {
        grid-template-columns: 1fr;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-group select {
        width: 100%;
    }
}

/* Hilfsmeldungen */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
}

.empty-state::before {
    content: "📋";
    display: block;
    font-size: 3em;
    margin-bottom: 10px;
}

/* Folgetage-Modal */
.folgetage-checkboxes {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    margin: 15px 0;
}

.checkbox-item {
    padding: 10px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 5px;
    transition: background 0.2s;
}

.checkbox-item:hover {
    background: #e9ecef;
}

.checkbox-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 1em;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Einstellungen */
.settings-container {
    max-width: 800px;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.settings-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.settings-section h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.2em;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.color-picker-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.color-picker-group input[type="color"] {
    width: 60px;
    height: 40px;
    border: 2px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
}

.color-picker-group input[type="text"] {
    flex: 1;
    max-width: 120px;
}

.settings-section small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 0.85em;
}
