* {
    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;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    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 h1 {
    font-size: 2em;
    margin-bottom: 10px;
}

/* Datenbankstatus-Anzeige */
.db-status {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.db-status.connected {
    background: rgba(76, 175, 80, 0.3);
}

.db-status.disconnected {
    background: rgba(244, 67, 54, 0.3);
}

.db-status .status-indicator {
    font-size: 18px;
    animation: pulse 2s infinite;
}

.db-status.connected .status-indicator {
    color: #4CAF50;
    animation: none;
}

.db-status.disconnected .status-indicator {
    color: #f44336;
    animation: none;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.db-status .status-text {
    font-weight: 500;
}

nav {
    display: flex;
    gap: 10px;
}

.nav-btn {
    padding: 12px 25px;
    border: 2px solid white;
    background: transparent;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

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

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

.content-section {
    display: none;
    padding: 40px;
}

.content-section.active {
    display: block;
}

h2 {
    color: #333;
    margin-bottom: 30px;
    font-size: 1.8em;
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    padding: 14px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #555;
}

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

.message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    display: none;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
    display: block;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
    display: block;
}

/* Übersicht Styles */
.filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.filter-bar input {
    flex: 1;
    min-width: 200px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

.filter-bar select {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

/* E-Mail Versand-Box */
.email-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.email-box h3 {
    color: white;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.email-box-info {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.email-box .form-group {
    margin-bottom: 15px;
}

.email-box .form-group label {
    color: white;
}

.email-box .form-group input {
    background: white;
}

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

.email-actions .btn {
    flex: 1;
    min-width: 200px;
}

.retouren-liste {
    display: grid;
    gap: 20px;
}

.retoure-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    border-left: 5px solid #667eea;
    transition: all 0.3s;
    position: relative;
}

.retoure-card.selected {
    border-left: 5px solid #28a745;
    background: #e8f5e9;
}

.retoure-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateX(5px);
}

.retoure-checkbox {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.retoure-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-right: 35px;
}

.retoure-header h3 {
    color: #333;
    font-size: 1.3em;
}

.status-badge {
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.offen {
    background: #ffc107;
    color: #333;
}

.status-badge.versendet {
    background: #28a745;
    color: white;
}

.status-badge.abgeschlossen {
    background: #6c757d;
    color: white;
}

.retoure-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.info-item {
    color: #666;
    font-size: 14px;
}

.info-item strong {
    color: #333;
    display: block;
    margin-bottom: 5px;
}

.retoure-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-small {
    padding: 8px 15px;
    font-size: 13px;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
}

.btn-status {
    background: #17a2b8;
    color: white;
}

.btn-status:hover {
    background: #138496;
}

.loading {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 40px;
}

.no-results {
    text-align: center;
    color: #999;
    padding: 40px;
    font-size: 16px;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.5em;
    }
    
    nav {
        flex-direction: column;
    }
    
    .content-section {
        padding: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .filter-bar {
        flex-direction: column;
    }
    
    .retoure-info {
        grid-template-columns: 1fr;
    }
    
    .email-actions {
        flex-direction: column;
    }
    
    .email-actions .btn {
        min-width: 100%;
    }
}
