/* Reset und Grundstile */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    color: #333;
}

/* Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 10px;
    color: #667eea;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.2em;
    color: #666;
}

/* Navigation */
.navbar {
    background: #667eea;
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-brand {
    font-size: 1.4em;
    font-weight: bold;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Menü */
.menu {
    background: white;
    padding: 15px 30px;
    display: flex;
    gap: 10px;
    border-bottom: 2px solid #eee;
    overflow-x: auto;
}

.menu button {
    padding: 10px 20px;
    border: none;
    background: #f5f5f5;
    cursor: pointer;
    border-radius: 5px;
    font-size: 1em;
    transition: all 0.3s;
}

.menu button:hover {
    background: #e0e0e0;
}

.menu button.active {
    background: #667eea;
    color: white;
}

/* Content */
.content {
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.view h2 {
    margin-bottom: 20px;
    color: #667eea;
}

/* Formulare */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s;
    background: #e0e0e0;
    color: #333;
}

.btn:hover {
    background: #d0d0d0;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-small {
    padding: 5px 10px;
    font-size: 0.9em;
}

.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.info-text {
    color: #666;
    font-style: italic;
    margin: 10px 0;
}

.manual-select {
    max-width: 400px;
    margin: 0 auto;
}

.scan-section {
    text-align: center;
    margin-bottom: 20px;
}

/* Map Markers */
.custom-marker {
    background: transparent !important;
    border: none !important;
}

/* Admin */
.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.admin-tabs button {
    padding: 10px 20px;
    border: none;
    background: #f5f5f5;
    cursor: pointer;
    border-radius: 5px 5px 0 0;
    font-size: 1em;
}

.admin-tabs button.active {
    background: #667eea;
    color: white;
}

.admin-section {
    margin-top: 20px;
}

.street-add-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    max-width: 500px;
}

.street-add-form input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.street-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.street-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #eee;
}

.street-item button {
    padding: 2px 8px;
    font-size: 1.2em;
    line-height: 1;
}

/* Area Images */
.area-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s;
}

.area-thumbnail:hover {
    transform: scale(1.1);
}

.area-thumbnail-large {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 10px;
}

.area-image-large {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 8px;
    margin-bottom: 15px;
}

.image-preview {
    text-align: center;
}

.current-image {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

/* Tabellen */
.data-table {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-top: 20px;
}

.data-table thead {
    background: #667eea;
    color: white;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
}

.data-table tbody tr:nth-child(even) {
    background: #f9f9f9;
}

.data-table tbody tr:hover {
    background: #f0f0f0;
}

.data-table tbody tr.selected-row {
    background: #e8f0fe;
}

.data-table tbody tr.selected-row:hover {
    background: #d4e4fc;
}

/* Filters */
.filters {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filters label {
    font-weight: 600;
}

.filters select {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
}

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

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h3 {
    margin-bottom: 20px;
    color: #667eea;
}

/* Status Badges */
.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
}

.status-frei {
    background: #95a5a6;
    color: white;
}

.status-angefragt {
    background: #f39c12;
    color: white;
}

.status-zugewiesen {
    background: #3498db;
    color: white;
}

.status-abgeschlossen {
    background: #27ae60;
    color: white;
}

.status-ausgegeben {
    background: #e67e22;
    color: white;
}

.status-zurueckgegeben {
    background: #f39c12;
    color: white;
}

.status-gezaehlt {
    background: #2ecc71;
    color: white;
}

.status-geplant {
    background: #9b59b6;
    color: white;
}

.status-zugesagt {
    background: #27ae60;
    color: white;
}

.status-abgelehnt {
    background: #e74c3c;
    color: white;
}

/* Toast-Benachrichtigungen */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 2000;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
    }
    to {
        transform: translateX(0);
    }
}

.toast-success {
    background: #27ae60;
}

.toast-error {
    background: #e74c3c;
}

.toast-info {
    background: #3498db;
}

/* Error Message */
.error-message {
    color: #e74c3c;
    margin-top: 15px;
    padding: 10px;
    background: #fadbd8;
    border-radius: 5px;
}

/* Summary */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.summary-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.summary-card h4 {
    color: #666;
    margin-bottom: 10px;
}

.summary-value {
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
}

/* Export Buttons */
.export-buttons {
    margin-top: 30px;
}

.export-buttons h3 {
    margin-bottom: 15px;
}

.export-buttons button {
    margin-right: 10px;
    margin-bottom: 10px;
}

/* QR Scanner */
.scan-section {
    text-align: center;
    margin: 20px 0;
}

#qr-reader,
#qr-reader-return {
    border: 2px solid #667eea;
    border-radius: 8px;
    overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
    }

    .menu {
        flex-wrap: wrap;
    }

    .content {
        padding: 15px;
    }

    .data-table {
        font-size: 0.9em;
    }

    .data-table th,
    .data-table td {
        padding: 8px 10px;
    }
}
