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

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

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

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

header h1 {
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.reset-btn {
    background: #ff4757;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.sync-status {
    font-size: 0.8rem;
    opacity: 0.9;
}

.sync-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
}

.sync-indicator.synced {
    color: #2ed573;
}

.sync-indicator.error {
    color: #ff4757;
}

.legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid #ddd;
}

.legend-color.delivered {
    background-color: #2ed573;
    border-color: #24a85c;
}

.legend-color.pending {
    background-color: #ff4757;
    border-color: #e63946;
}

.legend-color.default {
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

.loading {
    text-align: center;
    padding: 40px;
    font-size: 1.1rem;
    color: #666;
    display: none;
}

.table-container {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

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

thead {
    background: #343a40;
    color: white;
}

th, td {
    padding: 15px 10px;
    text-align: center;
    border-bottom: 1px solid #dee2e6;
}

th {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    font-size: 0.95rem;
}

.booth-number {
    font-weight: 600;
    color: #495057;
}

select {
    padding: 8px 12px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
    min-width: 80px;
}

select:focus {
    outline: none;
    border-color: #667eea;
}

select:hover {
    border-color: #adb5bd;
}

/* Row color coding */
tr.delivered {
    background-color: #d4edda;
    border-left: 4px solid #2ed573;
}

tr.pending {
    background-color: #f8d7da;
    border-left: 4px solid #ff4757;
}

tr.default {
    background-color: #f8f9fa;
}

tr:hover {
    background-color: #e9ecef;
}

tr.delivered:hover {
    background-color: #c3e6cb;
}

tr.pending:hover {
    background-color: #f1b0b7;
}

.stats {
    display: flex;
    justify-content: space-around;
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
    gap: 20px;
}

.stat-item {
    text-align: center;
    min-width: 120px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header {
        flex-direction: column;
        text-align: center;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .controls {
        justify-content: center;
    }

    .legend {
        flex-direction: column;
        align-items: center;
    }

    th, td {
        padding: 10px 5px;
        font-size: 0.8rem;
    }

    select {
        min-width: 60px;
        padding: 6px 8px;
        font-size: 0.8rem;
    }

    .stats {
        flex-direction: column;
        gap: 15px;
    }

    .stat-item {
        min-width: auto;
    }

    .stat-number {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 5px;
    }

    header {
        padding: 15px;
    }

    header h1 {
        font-size: 1.3rem;
    }

    th, td {
        padding: 8px 3px;
        font-size: 0.75rem;
    }

    select {
        min-width: 50px;
        padding: 4px 6px;
        font-size: 0.75rem;
    }

    .reset-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
}

/* Loading animations */
.fa-spin {
    animation: fa-spin 2s infinite linear;
}

@keyframes fa-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(359deg);
    }
}

/* Smooth transitions */
tr {
    transition: background-color 0.3s ease;
}

select {
    transition: all 0.3s ease;
}

.reset-btn {
    transition: all 0.3s ease;
}

/* Focus styles for accessibility */
select:focus {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.reset-btn:focus {
    box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.3);
}

/* Print styles */
@media print {
    .controls, .stats, .legend {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .container {
        max-width: none;
        margin: 0;
        padding: 0;
    }
    
    .table-container {
        box-shadow: none;
    }
}
