/* Kitchen Display Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f8f9ff 0%, #e3f2fd 100%);
    min-height: 100vh;
    color: #333;
}

/* Header Styles */
.kitchen-header {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.3);
    object-fit: cover;
}

.logo-section h1 {
    font-size: 28px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.status-section {
    display: flex;
    align-items: center;
    gap: 30px;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff9800;
    animation: pulse 2s infinite;
}

.status-indicator.connected {
    background: #4caf50;
}

.status-indicator.disconnected {
    background: #f44336;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.order-count {
    font-size: 18px;
    font-weight: bold;
    background: rgba(255,255,255,0.1);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.current-time {
    font-size: 16px;
    font-weight: 500;
    background: rgba(255,255,255,0.1);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

/* Control Panel */
.control-panel {
    background: #ffffff;
    padding: 15px 20px;
    border-bottom: 1px solid #e3f2fd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    box-shadow: 0 2px 4px rgba(25, 118, 210, 0.1);
}

.controls-left, .controls-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: #1976d2;
    color: white;
}

.btn-primary:hover {
    background: #1565c0;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.btn-secondary:hover {
    background: #bbdefb;
}

.btn-success {
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
    color: white;
    font-weight: bold;
    font-size: 16px;
    padding: 12px 24px;
    border-radius: 25px;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    border: 2px solid #4caf50;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-success:hover {
    background: linear-gradient(135deg, #45a049 0%, #4caf50 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
    border-color: #45a049;
}

.btn-success:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

/* Pulse animation for Complete button */
.complete-order-btn {
    animation: pulse 2s infinite;
}

.complete-order-btn:disabled {
    background: #ccc !important;
    cursor: not-allowed !important;
    animation: none !important;
    box-shadow: none !important;
    transform: none !important;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(76, 175, 80, 0.6);
    }
    100% {
        box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    }
}

/* Modal item styles */
.item-price {
    color: #666;
    font-size: 14px;
}

.item-quantity-section {
    text-align: right;
}

.quantity-badge {
    background: #1976d2;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.item-total {
    color: #1976d2;
    font-weight: bold;
    margin-top: 4px;
}

.btn-danger {
    background: #f44336;
    color: white;
}

.btn-danger:hover {
    background: #da190b;
}

.btn-icon {
    font-size: 16px;
}

.filter-select {
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

/* Orders Grid */
.orders-container {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Statistics Panel */
.statistics-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9ff 0%, #e3f2fd 100%);
    border-bottom: 2px solid #1976d2;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.1);
    border: 2px solid #e3f2fd;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.2);
    border-color: #1976d2;
}

.stat-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #1976d2;
}

/* Orders Sections */
.orders-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 20px;
    font-weight: bold;
    color: #1976d2;
    margin-bottom: 15px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #e3f2fd 0%, #f8f9ff 100%);
    border-radius: 8px;
    border-left: 4px solid #1976d2;
}

.completed-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e3f2fd;
}

.completed-section .section-title {
    color: #4caf50;
    background: linear-gradient(135deg, #e8f5e8 0%, #f1f8e9 100%);
    border-left-color: #4caf50;
}

.orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.completed-grid .order-card {
    opacity: 0.8;
    background: #f5f5f5;
    border-left-color: #4caf50;
}

.completed-grid .order-card:hover {
    opacity: 1;
    transform: translateY(-2px);
}

/* Order Card */
.order-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.1);
    border-left: 5px solid #1976d2;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.order-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(25, 118, 210, 0.2);
}

.order-card.new {
    border-left-color: #1976d2;
    animation: newOrderPulse 3s ease-in-out;
}

.order-card.in-progress {
    border-left-color: #42a5f5;
}

.order-card.ready {
    border-left-color: #66bb6a;
}

.order-card.served {
    border-left-color: #9e9e9e;
    opacity: 0.7;
}

@keyframes newOrderPulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
    50% { box-shadow: 0 4px 12px rgba(255,152,0,0.3); }
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.order-info h3 {
    font-size: 20px;
    color: #1976d2;
    margin-bottom: 5px;
}

.order-meta {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.order-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.order-status.new {
    background: #e3f2fd;
    color: #1976d2;
}

.order-status.in-progress {
    background: #e3f2fd;
    color: #1976d2;
}

.order-status.ready {
    background: #e8f5e8;
    color: #2e7d32;
}

.order-status.served {
    background: #f5f5f5;
    color: #616161;
}

.order-timing {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.timing-item {
    text-align: center;
}

.timing-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.timing-value {
    font-size: 16px;
    font-weight: bold;
    color: #1976d2;
}

.order-items {
    margin-bottom: 15px;
}

.order-items h4 {
    font-size: 14px;
    color: #333;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.item-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 14px;
}

.item-name {
    font-weight: 500;
}

.item-quantity {
    background: #1976d2;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.order-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-top: 2px solid #1976d2;
    font-size: 16px;
    font-weight: bold;
    color: #1976d2;
}

.order-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.order-actions .btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 12px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.1);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-state h2 {
    font-size: 24px;
    color: #1976d2;
    margin-bottom: 10px;
}

.empty-state p {
    color: #1976d2;
    font-size: 16px;
}

/* 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;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #1976d2;
    color: white;
    border-radius: 12px 12px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: white;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(255,255,255,0.2);
}

.modal-body {
    padding: 20px;
}

.order-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.label {
    font-weight: bold;
    color: #666;
}

.order-items h3 {
    margin-bottom: 15px;
    color: #1976d2;
}

.items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.item-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.order-notes {
    margin-bottom: 20px;
}

.order-notes label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.order-notes textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
}

.modal-footer {
    display: flex;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.modal-footer .btn {
    flex: 1;
    padding: 12px;
    font-size: 16px;
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4caf50;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1001;
}

.toast.show {
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast-icon {
    font-size: 20px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #1976d2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .status-section {
        flex-direction: column;
        gap: 10px;
    }
    
    .control-panel {
        flex-direction: column;
        align-items: stretch;
    }
    
    .controls-left, .controls-right {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .orders-grid {
        grid-template-columns: 1fr;
    }
    
    .order-details {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
}

@media (max-width: 480px) {
    .kitchen-header {
        padding: 15px;
    }
    
    .logo-section h1 {
        font-size: 24px;
    }
    
    .orders-container {
        padding: 15px;
    }
    
    .order-card {
        padding: 15px;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}
