* {
    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;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    padding: 20px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2em;
    opacity: 0.9;
}

.upload-section {
    background: white;
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.upload-box {
    text-align: center;
}

#fileInput {
    display: none;
}

.upload-label {
    display: inline-block;
    padding: 20px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1em;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.upload-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.upload-icon {
    font-size: 1.5em;
    margin-right: 10px;
}

.upload-hint {
    margin-top: 15px;
    color: #666;
    font-size: 0.9em;
    text-align: center;
}

.filters-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.filters-section h2 {
    margin-bottom: 15px;
    color: #667eea;
}

.filter-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 24px;
    background: #f0f0f0;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s;
    font-weight: 500;
}

.filter-btn:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

/* Arama ve filtreleme */
.search-filters {
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.search-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
}

.date-filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.date-filter-group label {
    font-weight: 600;
    color: #667eea;
}

.date-input {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.95em;
}

.clear-btn {
    padding: 10px 20px;
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.clear-btn:hover {
    background: #cc0000;
}

.dashboard {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.stat-card h3 {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 2.5em;
    font-weight: bold;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.chart-container {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.chart-container h3 {
    margin-bottom: 20px;
    color: #667eea;
    text-align: center;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 10px;
    margin: -10px -10px 20px -10px;
    border-radius: 8px;
    transition: background 0.3s;
}

.chart-header:hover {
    background: rgba(102, 126, 234, 0.1);
}

.toggle-icon {
    font-size: 0.8em;
    transition: transform 0.3s;
    color: #667eea;
}

.chart-content {
    transition: max-height 0.3s ease-out, opacity 0.3s;
    overflow: hidden;
}

.chart-content.collapsed {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
}

.chart-container.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.chart-container canvas {
    max-height: 400px;
}

.chart-description {
    margin-bottom: 15px;
    padding: 10px;
    background: #e8f4f8;
    border-left: 4px solid #667eea;
    border-radius: 5px;
    font-size: 0.9em;
    color: #555;
    line-height: 1.6;
}

.data-section {
    margin-bottom: 40px;
}

.data-section h2 {
    color: #667eea;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #667eea;
}

.table-container {
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 0.5px;
}

tbody tr {
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

tbody tr:hover {
    background: #f8f9fa;
}

td {
    padding: 12px 15px;
}

td:first-child {
    font-weight: 600;
    color: #667eea;
}

/* Tablo kontrolleri */
.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    flex-wrap: wrap;
    gap: 15px;
}

.table-info {
    font-weight: 600;
    color: #667eea;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.page-btn {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.page-btn:hover:not(:disabled) {
    background: #5568d3;
}

.page-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

#pageInfo {
    font-weight: 600;
    color: #667eea;
}

.page-size-select {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 0.9em;
    cursor: pointer;
}

/* Sıralanabilir sütunlar */
.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.sortable:hover {
    background: rgba(102, 126, 234, 0.1);
}

.sortable::after {
    content: ' ↕';
    opacity: 0.5;
    font-size: 0.8em;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.loading-content {
    background: white;
    padding: 30px 50px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content p {
    color: #667eea;
    font-size: 1.1em;
    font-weight: 600;
}

/* Error message */
.error-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #ff4444;
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 10001;
    max-width: 400px;
    font-weight: 500;
    display: none;
}

/* Success message */
.success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #44ff44;
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 10001;
    max-width: 400px;
    font-weight: 500;
    display: none;
}

/* Tablo iyileştirmeleri */
.vehicle-summary-cell {
    max-width: 300px;
    word-wrap: break-word;
}

/* Export butonu */
.export-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    margin: 10px 5px;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.export-buttons {
    margin-bottom: 20px;
    text-align: right;
}

@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 1.8em;
    }
    
    .stat-value {
        font-size: 2em;
    }
    
    .error-message,
    .success-message {
        right: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
    }
}

