/* Admin CSS Styles */
* {
    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;
    color: #333;
}

/* Login Page Styles */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 10px;
}

.login-header p {
    color: #666;
    font-size: 1.1rem;
}

.error-message {
    background: #e74c3c;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
}

.login-form {
    margin-bottom: 30px;
}

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

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

.form-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
}

.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
}

.login-footer {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

.login-footer code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.back-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

/* Dashboard Page Styles */
.dashboard-page {
    background: #f5f6fa;
}

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

.dashboard-header {
    background: white;
    padding: 20px 30px;
    border-radius: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-left h1 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 5px;
}

.header-left p {
    color: #666;
    font-size: 1.1rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logout-btn {
    background: #e74c3c;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.3s ease;
}

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

.dashboard-nav {
    background: white;
    padding: 0;
    border-radius: 15px;
    margin-bottom: 20px;
    display: flex;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.nav-link {
    flex: 1;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: #666;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    background: #f8f9fa;
    color: #3498db;
    border-bottom-color: #3498db;
}

.dashboard-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    min-height: 600px;
}

.tab-content {
    display: none;
}

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

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

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

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

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

.stat-card:nth-child(4) {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #333;
}

.stat-icon {
    font-size: 3rem;
}

.stat-info h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    opacity: 0.9;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
}

/* Recent Section */
.recent-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.recent-table-container {
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.recent-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.recent-table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e0e0e0;
}

.recent-table td {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.recent-table tr:hover {
    background: #f8f9fa;
}

.vehicle-type {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
}

.vehicle-type.car {
    background: #e3f2fd;
    color: #1976d2;
}

.vehicle-type.bike {
    background: #e8f5e8;
    color: #388e3c;
}

.vehicle-type.other {
    background: #fff3e0;
    color: #f57c00;
}

.no-data {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 30px;
}

/* Charts */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.chart-container {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.chart-container.full-width {
    grid-column: 1 / -1;
}

.chart-container h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

.chart-container canvas {
    max-height: 300px;
}

/* Records */
.records-controls {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-weight: 600;
    color: #2c3e50;
}

.filter-group input,
.filter-group select {
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

.filter-btn,
.refresh-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn {
    background: #3498db;
    color: white;
}

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

.refresh-btn {
    background: #95a5a6;
    color: white;
}

.refresh-btn:hover {
    background: #7f8c8d;
}

.records-table-container {
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-height: 500px;
    overflow-y: auto;
}

/* Export */
.export-section h3 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.export-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.export-option {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.export-option h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.export-option p {
    color: #666;
    margin-bottom: 20px;
}

.date-range {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.date-range input {
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

.date-range span {
    font-weight: 600;
    color: #666;
}

.export-btn {
    padding: 12px 25px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.export-btn:hover {
    background: #229954;
    transform: translateY(-2px);
}

.export-btn.export-warning {
    background: #e74c3c;
}

.export-btn.export-warning:hover {
    background: #c0392b;
}

/* Loading States */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e0e0e0;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 10px;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .dashboard-nav {
        flex-direction: column;
    }
    
    .nav-link {
        border-bottom: none;
        border-left: 3px solid transparent;
    }
    
    .nav-link:hover,
    .nav-link.active {
        border-left-color: #3498db;
        border-bottom-color: transparent;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .records-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .export-options {
        grid-template-columns: 1fr;
    }
    
    .date-range {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
    }
    
    .dashboard-content {
        padding: 20px;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}
