* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 20px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
    text-align: center;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-weight: 500;
}

nav a:hover,
nav a.active {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

main {
    padding: 40px;
}

.appointment-form-section {
    max-width: 800px;
    margin: 0 auto;
}

.appointment-form-section h2 {
    color: #2c3e50;
    font-size: 2.2em;
    margin-bottom: 15px;
    text-align: center;
}

.instructions {
    text-align: center;
    color: #666;
    font-size: 1.1em;
    margin-bottom: 30px;
    padding: 15px;
    background: #e8f4fd;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.mechanics-availability {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 2px solid #e9ecef;
}

.mechanics-availability h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

#mechanics-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.mechanic-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
    text-align: center;
    transition: transform 0.3s ease;
}

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

.mechanic-name {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 8px;
}

.availability {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: bold;
}

.availability.available {
    background: #d4edda;
    color: #155724;
}

.availability.limited {
    background: #fff3cd;
    color: #856404;
}

.availability.full {
    background: #f8d7da;
    color: #721c24;
}

form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

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

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

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.error {
    color: #e74c3c;
    font-size: 0.9em;
    margin-top: 5px;
    display: block;
}

.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
}

.admin-section {
    max-width: 1000px;
    margin: 0 auto;
}

.admin-section h2 {
    color: #2c3e50;
    font-size: 2.2em;
    margin-bottom: 30px;
    text-align: center;
}

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

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-left: 4px solid #3498db;
}

.stat-card h3 {
    color: #2c3e50;
    font-size: 1em;
    margin-bottom: 10px;
}

.stat-card p {
    font-size: 2em;
    font-weight: bold;
    color: #3498db;
}

.admin-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.admin-card h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.filter-controls {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    align-items: end;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

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

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.clear-filters-btn {
    background: #e74c3c;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.clear-filters-btn:hover {
    background: #c0392b;
}

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

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    position: sticky;
    top: 0;
}

tr:hover {
    background: #f8f9fa;
}

.action-btn {
    padding: 5px 10px;
    margin: 2px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    transition: all 0.3s ease;
}

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

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

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

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

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
}

.status-scheduled {
    background: #e8f4fd;
    color: #2980b9;
}

.status-in-progress {
    background: #fff3cd;
    color: #856404;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 20px;
    background: #2c3e50;
    color: white;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

.close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    opacity: 0.7;
}

.modal form {
    padding: 20px;
    box-shadow: none;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.cancel-btn {
    background: #95a5a6;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.save-btn {
    background: #27ae60;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.message-container {
    margin: 20px 0;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.message-container.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.message-container.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: auto;
}

@media (max-width: 768px) {
    .container {
        margin: 0;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    nav ul {
        flex-direction: column;
        gap: 10px;
    }
    
    main {
        padding: 20px;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .filter-controls {
        flex-direction: column;
    }
    
    table {
        font-size: 0.9em;
    }
    
    th, td {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8em;
    }
    
    main {
        padding: 15px;
    }
    
    form {
        padding: 20px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}