/* Reset and Base 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 Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-header i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 20px;
}

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

.login-header p {
    color: #666;
    margin-bottom: 30px;
}

.login-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

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

.login-form label i {
    margin-right: 8px;
    color: #667eea;
}

.login-form input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

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

.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

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

.login-btn i {
    margin-right: 8px;
}

/* Dashboard Styles */
.dashboard-container {
    min-height: 100vh;
    background: #f8f9fa;
}

.dashboard-header {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-left i {
    font-size: 2rem;
    color: #667eea;
    margin-right: 15px;
}

.header-left h1 {
    color: #333;
    font-size: 1.8rem;
}

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

.user-info {
    color: #666;
    font-weight: 500;
}

.logout-btn {
    padding: 10px 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

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

.dashboard-main {
    padding: 30px;
}

.controls-section {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filters h3 {
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.filters h3 i {
    margin-right: 10px;
    color: #667eea;
}

.filter-group {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.filter-input {
    padding: 10px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    min-width: 200px;
    transition: border-color 0.3s ease;
}

.filter-input:focus {
    outline: none;
    border-color: #667eea;
}

.clear-btn {
    padding: 10px 15px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.clear-btn:hover {
    background: #5a6268;
}

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

.action-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.insert-btn {
    background: #28a745;
    color: white;
}

.insert-btn:hover {
    background: #218838;
}

.calculate-btn {
    background: #007bff;
    color: white;
}

.calculate-btn:hover {
    background: #0056b3;
}

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

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

/* Table Styles */
.table-section {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.table-container {
    overflow-x: auto;
}

.cars-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.cars-table th,
.cars-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

.cars-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    position: sticky;
    top: 0;
}

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

.cars-table .currency {
    text-align: right;
    font-weight: 500;
}

.loading-table {
    text-align: center;
    padding: 40px;
    color: #667eea;
    font-size: 1.2rem;
}

.loading-table i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #666;
}

.no-data i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #ccc;
}

/* Modal Styles */
.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;
    border-radius: 10px;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e1e5e9;
}

.modal-header h2 {
    color: #333;
    display: flex;
    align-items: center;
}

.modal-header h2 i {
    margin-right: 10px;
    color: #667eea;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.close-btn:hover {
    background: #f8f9fa;
}

.insert-form .form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.insert-form .form-group {
    flex: 1;
}

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

.insert-form input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

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

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e1e5e9;
}

.cancel-btn {
    padding: 12px 20px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.cancel-btn:hover {
    background: #5a6268;
}

.submit-btn {
    padding: 12px 20px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background: #218838;
}

/* Message Styles */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 15px;
    border-radius: 6px;
    margin-top: 15px;
    border: 1px solid #f5c6cb;
}

.loading-message {
    background: #d1ecf1;
    color: #0c5460;
    padding: 12px 15px;
    border-radius: 6px;
    margin-top: 15px;
    border: 1px solid #bee5eb;
    text-align: center;
}

.loading-message i {
    margin-right: 8px;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px 15px;
    border-radius: 6px;
    margin-top: 15px;
    border: 1px solid #c3e6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-input {
        min-width: auto;
    }
    
    .actions {
        justify-content: center;
    }
    
    .insert-form .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .cars-table {
        font-size: 14px;
    }
    
    .cars-table th,
    .cars-table td {
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .dashboard-main {
        padding: 15px;
    }
    
    .controls-section,
    .table-section {
        padding: 15px;
    }
    
    .modal-content {
        padding: 20px;
        margin: 10px;
    }
}
