/* Mobile-first styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    font-size: 16px;
    background-color: #f0f4f8; 
}

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

.header {
    background: #4CAF50;
    color: white;
    padding: 1rem;
    text-align: center;
}

.nav {
    background: #f4f4f4;
    padding: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: #4CAF50;
    outline: none;
}

.btn {
    padding: 0.5rem 1rem;
    background: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 4px;
}

.btn:hover {
    background: #45a049;
}

.btn-success {
    background-color: #4CAF50;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 0.5rem;
    width: 100%;
}

.btn-success:hover {
    background-color: #45a049;
}

.login-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
}

.login-logo {
    margin-bottom: 2rem;
    text-align: center;
}

.login-logo .avatar {
    width: 120px;
    height: 120px;
    background: #4CAF50;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.login-logo .avatar span {
    color: white;
    font-size: 3rem;
    font-weight: bold;
    letter-spacing: -2px;
}

.login-logo h1 {
    color: #333;
    font-size: 2rem;
    margin: 0;
    font-weight: 600;
}

.login-logo p {
    color: #666;
    margin-top: 0.5rem;
    font-size: 1rem;
}

.login-logo svg {
    display: none;
}

.login-container .btn {
    width: 100%;
    padding: 0.8rem;
    font-size: 1.1rem;
    border-radius: 8px;
    background: #4CAF50;
    transition: background-color 0.3s ease;
}

.login-container .btn:hover {
    background: #43A047;
}

.login-hint {
    margin-top: 1rem;
    color: #888;
    font-size: 0.9rem;
}

.dashboard {
    padding: 1rem;
}

.dashboard > div {
    margin-bottom: 2rem;
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.services-list, .appointments-list {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.service-card, .appointment-card {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.service-card h3 {
    margin-bottom: 0.5rem;
    color: #444;
}

.service-card p, .appointment-card p {
    margin-bottom: 0.5rem;
    color: #666;
}

.queue-section {
    margin-bottom: 2rem;
}

.queue-list {
    display: grid;
    gap: 1rem;
}

.queue-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.progress-indicator {
    width: 100%;
    height: 10px;
    background: #f0f0f0;
    border-radius: 5px;
    margin-bottom: 10px;
}

.progress-bar {
    height: 100%;
    background: #4CAF50;
    border-radius: 5px;
    transition: width 0.3s ease;
}

.booking-section {
    margin-bottom: 2rem;
}

.booking-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.statistics-section {
    margin-bottom: 2rem;
}

.statistics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: #333;
    font-size: 1.5rem;
    font-weight: bold;
}

.staff-performance {
    margin-bottom: 2rem;
}

.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.staff-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

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

.staff-card h3 {
    color: #4CAF50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #4CAF50;
    font-size: 1.1rem;
}

.staff-card p {
    color: #666;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.staff-assignment {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.staff-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.metric {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.metric-label {
    color: #666;
    font-size: 0.8rem;
    font-weight: 500;
}

.metric-value {
    color: #4CAF50;
    font-size: 1.1rem;
    font-weight: bold;
}

h2 {
    color: #4CAF50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #4CAF50;
    font-size: 1.5rem;
}

h3 {
    color: #444;
    margin-bottom: 0.5rem;
}

.btn-small {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.status-pending {
    color: #ff9800;
    font-weight: bold;
}

.status-confirmed {
    color: #2196F3;
    font-weight: bold;
}

.status-completed {
    color: #4CAF50;
    font-weight: bold;
}

.status-cancelled {
    color: #f44336;
    font-weight: bold;
}

.car-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

input[required]::placeholder {
    color: #666;
}

input[required]::placeholder::after {
    content: " *";
    color: #ff0000;
}

.tracking-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.status-value {
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    text-transform: capitalize;
}

.status-value.status-pending {
    background-color: #fff3e0;
    color: #ff9800;
}

.status-value.status-confirmed {
    background-color: #e3f2fd;
    color: #2196F3;
}

.status-value.status-completed {
    background-color: #e8f5e9;
    color: #4CAF50;
}

.status-value.status-cancelled {
    background-color: #ffebee;
    color: #f44336;
}

.car-animation {
    margin-bottom: 2rem;
    overflow: hidden;
    position: relative;
    height: 120px;
}

.car-animation svg {
    width: 100%;
    height: auto;
    position: absolute;
    bottom: 0;
}

.car-animation .car {
    animation: drive 3s linear infinite;
}

.car-animation svg.completed {
    width: 100%;
    height: auto;
    position: absolute;
    bottom: 0;
}

.car-animation svg.completed .car {
    animation: none;
    transform: translateX(100px);  
}

.car-animation svg.completed .raindrop {
    animation: none;
    opacity: 0;  
}

.raindrop {
    opacity: 0;
    animation: rain 1s linear infinite;
}

.raindrop:nth-child(2) { animation-delay: 0.2s; }
.raindrop:nth-child(3) { animation-delay: 0.4s; }
.raindrop:nth-child(4) { animation-delay: 0.6s; }
.raindrop:nth-child(5) { animation-delay: 0.8s; }
.raindrop:nth-child(6) { animation-delay: 1.0s; }
.raindrop:nth-child(7) { animation-delay: 1.2s; }
.raindrop:nth-child(8) { animation-delay: 1.4s; }

@keyframes rain {
    0% {
        transform: translateY(-20px);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(30px);
        opacity: 0;
    }
}

@keyframes drive {
    from { transform: translateX(-40px); }
    to { transform: translateX(100px); }
}

@keyframes complete {
    to { transform: translateX(100px); }
}

.tracking-details {
    margin-top: 2rem;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.detail-item {
    padding: 1rem;
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: background-color 0.3s ease;
}

.detail-item:hover {
    background-color: #f5f5f5;
}

.detail-item .label {
    display: block;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.detail-item .value {
    font-size: 1.1rem;
    color: #4CAF50;
    font-weight: 500;
    transition: color 0.3s ease;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

.error-message {
    color: #ff0000;
    margin: 10px 0;
    padding: 10px;
    border: 1px solid #ffcdd2;
    background-color: #ffebee;
    border-radius: 4px;
    text-align: center;
}

/* Rating Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.modal-close:hover {
    color: #4CAF50;
}

.rating-stars {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.star {
    font-size: 2rem;
    cursor: pointer;
    color: #ddd;
    transition: color 0.2s ease;
}

.star:hover,
.star.filled {
    color: #4CAF50;
}

.feedback-input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin: 1rem 0;
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

.feedback-input:focus {
    border-color: #4CAF50;
    outline: none;
}

.rating-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

.skip-rating,
.submit-rating {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.skip-rating {
    background: none;
    border: 1px solid #4CAF50;
    color: #4CAF50;
}

.skip-rating:hover {
    background: #f5f5f5;
}

.submit-rating {
    background: #4CAF50;
    border: none;
    color: white;
}

.submit-rating:hover {
    background: #43A047;
}

.submit-rating:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Pagination Styles */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
    padding: 0.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pagination-info {
    color: #666;
    font-size: 0.9rem;
}

.pagination-buttons {
    display: flex;
    gap: 0.5rem;
}

.pagination-button {
    padding: 0.5rem 1rem;
    border: 1px solid #4CAF50;
    background: white;
    color: #4CAF50;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-button:hover {
    background: #4CAF50;
    color: white;
}

.pagination-button:disabled {
    border-color: #ccc;
    color: #ccc;
    cursor: not-allowed;
}

.pagination-button:disabled:hover {
    background: white;
    color: #ccc;
}

.items-per-page {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.items-per-page select {
    padding: 0.3rem;
    border: 1px solid #4CAF50;
    border-radius: 4px;
    color: #4CAF50;
}

/* Responsive Design */
@media (min-width: 768px) {
    .grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .services-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .appointments-list {
        grid-template-columns: repeat(2, 1fr);
    }
    .queue-section {
        grid-column: 1 / -1;
    }
    .statistics-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .services-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .staff-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .metric {
        text-align: center;
    }
    .car-details {
        grid-template-columns: 1fr;
    }
}

.weekly-stats-section {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.chart-container {
    background: white;
    padding: 1.5rem;
}