/* JTL-Dashboard Styles */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #34495e;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: #2c3e50;
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
    text-align: center;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header-content h1 {
    margin: 0;
    font-size: 1.8em;
}

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

.welcome-text {
    color: #ecf0f1;
    font-size: 0.9em;
}

.logout-btn {
    background: #e74c3c;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.logout-btn:hover {
    background: #c0392b;
    color: white;
    text-decoration: none;
}

/* Responsive Header */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .header-content h1 {
        font-size: 1.5em;
    }
    
    .user-info {
        flex-direction: column;
        gap: 10px;
    }
}

.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 2rem;
}

.card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-title {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    margin: 0 0 0 0 !important;
    font-size: 1.3rem;
    font-weight: 600;
    border-radius: 12px 12px 0 0;
}

/* Verschiedene Gradient-Farben für verschiedene Karten */
.card:nth-child(1) .card-title {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.card:nth-child(2) .card-title {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.card:nth-child(3) .card-title {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.card:nth-child(4) .card-title {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.card:nth-child(5) .card-title {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.card:nth-child(6) .card-title {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

.card-content {
    padding: 0 20px 20px 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

table th, table td {
    padding: 10px;
    text-align: left;
}

table th {
    background-color: var(--secondary-color);
    color: white;
}

table tr:nth-child(even) {
    background-color: #f2f2f2;
}

table tr:hover {
    background-color: #e2e2e2;
}

.total-row {
    border-top: 2px solid var(--primary-color);
    background-color: #f9f9f9 !important;
}

.total-row td {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .card {
        padding: 15px;
    }
    
    th, td {
        padding: 10px;
    }
}

/* Animationen */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    animation: fadeIn 0.5s ease-out;
}

.refresh-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 2rem;
}

.btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
    margin-bottom: 1rem;
}

.btn:hover {
    background-color: #2980b9;
}

.btn i {
    margin-right: 5px;
}

.refresh-info {
    text-align: center;
    margin-top: 1rem;
    color: var(--dark-color);
    font-size: 0.8rem;
}

footer {
    text-align: center;
    padding: 1rem 0;
    background-color: var(--primary-color);
    color: white;
    margin-top: 2rem;
}

/* Status Anzeige für Datenbank-Verbindung */
.connection-status {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 8px;
    border-radius: 4px;
    font-size: 0.9rem;
}

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

.status-error {
    background-color: #c0392b;
    color: white;
} 

table td:first-child {
    text-transform: capitalize;
} 

/* Zusätzliche Styles für die Ladeanimation */
        .loading {
            position: relative;
        }
        
        .loading::after {
            content: "";
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(255, 255, 255, 0.7);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 1000;
        }
        
        .loading::before {
            content: "Aktualisiere...";
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            padding: 20px;
            background: white;
            border-radius: 5px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
            z-index: 1001;
        }
        
        /* Datumsauswahl Styles */
        .date-selector {
            background: #f8f9fa;
            border: 1px solid #dee2e6;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        
        .date-selector h3 {
            margin: 0 0 15px 0;
            color: #495057;
            font-size: 1.1em;
        }
        
        .date-controls {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            align-items: flex-end;
        }
        
        .date-input-group {
            display: flex;
            flex-direction: column;
            gap: 5px;
        }
        
        .date-input-group label {
            font-size: 0.9em;
            color: #6c757d;
            font-weight: 500;
        }
        
        .date-input-group input[type="date"] {
            padding: 8px 12px;
            border: 1px solid #ced4da;
            border-radius: 4px;
            font-size: 0.9em;
            min-width: 140px;
        }
        
        .date-presets {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }
        
        .btn-secondary {
            background-color: #6c757d;
            border-color: #6c757d;
            color: white;
            padding: 8px 12px;
            font-size: 0.85em;
        }
        
        .btn-secondary:hover {
            background-color: #5a6268;
            border-color: #545b62;
        }
        
        .date-info {
            margin-top: 15px;
            padding-top: 15px;
            border-top: 1px solid #dee2e6;
        }
        
        .date-info small {
            color: #6c757d;
            font-style: italic;
        }
        
        /* Responsive Design für Datumsauswahl */
        @media (max-width: 768px) {
            .date-controls {
                flex-direction: column;
                align-items: stretch;
            }
            
            .date-presets {
                justify-content: center;
            }
            
            .date-input-group input[type="date"] {
                min-width: auto;
            }
        } 

        .stat-label {
            font-size: 0.9em;
            color: #6c757d;
            text-align: center;
            margin-top: 5px;
        }
        
        /* Aufträge Status Grid Layout */
        .orders-status-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            align-items: center;
        }
        
        .status-item {
            text-align: center;
            padding: 15px;
            background: #f8f9fa;
            border-radius: 8px;
            border: 1px solid #e9ecef;
        }
        
        .status-item .stat-number {
            font-size: 2.5em;
            font-weight: bold;
            color: #007bff;
            margin-bottom: 10px;
        }
        
        .status-item .stat-label {
            font-size: 0.9em;
            color: #495057;
            font-weight: 500;
            margin: 0;
        }
        
        /* Responsive Design für das Grid */
        @media (max-width: 768px) {
            .orders-status-grid {
                grid-template-columns: 1fr;
                gap: 15px;
            }
            
            .status-item .stat-number {
                font-size: 2em;
            }
        } 