/* Staff Dashboard Styles */
.staff-container {
    padding-top: 80px;
}

.staff-welcome {
    background: linear-gradient(135deg, #2D3047, #4A4F7A);
    color: white;
    padding: 40px 0;
}

.welcome-content h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.welcome-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

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

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.section-header h2 {
    color: var(--dark);
    margin: 0;
}

/* Order Filters */
.order-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid var(--primary);
    background: white;
    color: var(--primary);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
    font-weight: 500;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary);
    color: white;
}

.time-filter select {
    padding: 8px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 0.9rem;
}

/* Orders Container */
.orders-section,
.completed-section {
    padding: 60px 0;
    background: var(--accent);
}

.kitchen-section {
    padding: 60px 0;
    background: white;
}

.orders-container {
    display: grid;
    gap: 20px;
}

.order-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    border-left: 4px solid var(--primary);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.order-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.order-info-left h4 {
    margin: 0 0 5px 0;
    color: var(--dark);
    font-size: 1.1rem;
}

.order-meta {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: var(--gray);
}

.order-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.order-status-badge {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.status-pending { background: #fff3cd; color: #856404; }
.status-confirmed { background: #cce7ff; color: #004085; }
.status-preparing { background: #fff4cd; color: #856404; }
.status-ready { background: #d4edda; color: #155724; }
.status-completed { background: #d1ecf1; color: #0c5460; }
.status-cancelled { background: #f8d7da; color: #721c24; }

.order-items-preview {
    margin-bottom: 15px;
}

.order-item-preview {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
}

.order-item-preview:last-child {
    border-bottom: none;
}

.order-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: background 0.3s;
}

.action-btn.view {
    background: var(--primary);
    color: white;
}

.action-btn.view:hover {
    background: var(--secondary);
}

.action-btn.update {
    background: #17a2b8;
    color: white;
}

.action-btn.update:hover {
    background: #138496;
}

/* Kitchen Display */
.kitchen-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.kitchen-order-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    border-top: 4px solid var(--primary);
}

.kitchen-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.kitchen-order-header h4 {
    margin: 0;
    color: var(--dark);
}

.kitchen-timer {
    font-size: 0.9rem;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 5px;
}

.kitchen-items-by-category {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.kitchen-category {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.kitchen-category h5 {
    margin: 0 0 10px 0;
    color: var(--dark);
    font-size: 1rem;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 5px;
}

.kitchen-category-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kitchen-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: white;
    border-radius: 6px;
    border-left: 3px solid var(--primary);
}

.kitchen-item-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.item-quantity-badge {
    background: var(--primary);
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.kitchen-item-actions {
    display: flex;
    gap: 5px;
}

.kitchen-btn {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 500;
}

.kitchen-btn.start {
    background: #28a745;
    color: white;
}

.kitchen-btn.complete {
    background: #17a2b8;
    color: white;
}

/* Completed Orders */
.completed-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.completed-order-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 3px solid #28a745;
}

.completed-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.completed-order-header h5 {
    margin: 0;
    color: var(--dark);
}

.completion-time {
    font-size: 0.8rem;
    color: var(--gray);
}

.completed-items {
    font-size: 0.9rem;
    color: var(--gray);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e1e5e9;
}

.modal-header h3 {
    margin: 0;
    color: var(--dark);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
}

.modal-body {
    padding: 20px;
}

.order-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.info-group {
    display: flex;
    flex-direction: column;
}

.info-group label {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.order-items-modal {
    margin-bottom: 20px;
}

.order-items-modal h4 {
    margin-bottom: 10px;
    color: var(--dark);
}

.modal-order-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-order-item:last-child {
    border-bottom: none;
}

.special-instructions {
    margin-bottom: 20px;
    padding: 15px;
    background: #fff3cd;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

.special-instructions h4 {
    margin-bottom: 10px;
    color: #856404;
}

.status-update h4 {
    margin-bottom: 15px;
    color: var(--dark);
}

.status-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.status-btn {
    padding: 10px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.status-btn.pending { background: #fff3cd; color: #856404; }
.status-btn.confirmed { background: #cce7ff; color: #004085; }
.status-btn.preparing { background: #fff4cd; color: #856404; }
.status-btn.ready { background: #d4edda; color: #155724; }
.status-btn.completed { background: #d1ecf1; color: #0c5460; }
.status-btn.cancelled { background: #f8d7da; color: #721c24; }

.status-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.status-notes textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

/* Loading States */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--primary);
}

.loading i {
    font-size: 2rem;
    margin-bottom: 10px;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--gray);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .order-filters {
        justify-content: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px auto;
    }
    
    .status-buttons {
        grid-template-columns: 1fr 1fr;
    }
    
    .kitchen-container {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .order-card-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .order-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .status-buttons {
        grid-template-columns: 1fr;
    }
    
    .order-filters {
        flex-direction: column;
    }
    
    .filter-btn {
        text-align: center;
    }
}