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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

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

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

header p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* View Switcher */
.view-switcher {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 20px;
    background: white;
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.tab-button {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-button:hover {
    background-color: #f8f9fa;
}

.tab-button.active {
    background-color: #3498db;
    color: white;
}

.count {
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
}

.tab-button.active .count {
    background: rgba(255,255,255,0.3);
}

.tab-button:not(.active) .count {
    background: #ecf0f1;
    color: #7f8c8d;
}

/* Status Bar */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.last-updated {
    color: #7f8c8d;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-indicator {
    font-size: 1.2rem;
}

.status-indicator.connected {
    color: #27ae60;
}

.status-indicator.disconnected {
    color: #e74c3c;
}

.status-indicator.connecting {
    color: #f39c12;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Views */
.view {
    display: none;
}

.view.active {
    display: block;
}

/* Tables */
.table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

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

th {
    background-color: #34495e;
    color: white;
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 14px 12px;
    border-bottom: 1px solid #ecf0f1;
    vertical-align: top;
}

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

tr:last-child td {
    border-bottom: none;
}

/* Status badges */
.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

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

.status-batched {
    background-color: #cce5ff;
    color: #004085;
}

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

.status-open {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Order IDs formatting */
.order-ids {
    max-width: 200px;
    word-wrap: break-word;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    background-color: #f8f9fa;
    padding: 4px 6px;
    border-radius: 4px;
}

/* Timestamps */
.timestamp {
    font-size: 0.85rem;
    color: #7f8c8d;
    white-space: nowrap;
}

/* Empty states */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.empty-state h3 {
    margin-bottom: 8px;
    color: #95a5a6;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .status-bar {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    table {
        font-size: 0.85rem;
    }
    
    th, td {
        padding: 10px 8px;
    }
    
    .order-ids {
        max-width: 120px;
    }
}

@media (max-width: 480px) {
    th, td {
        padding: 8px 6px;
        font-size: 0.8rem;
    }
    
    .view-switcher {
        margin-bottom: 15px;
    }
    
    .tab-button {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
} 