/* Estilos específicos para a página de pedidos */
.pedidos-page {
    min-height: calc(100vh - 200px);
}

.pedidos-section {
    padding: 2rem 0;
}

.pedidos-intro {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.pedidos-container {
    background: var(--card);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    max-width: 1400px;
    margin: 0 auto;
}

.pedidos-header-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pedidos-header-content h3 {
    margin: 0;
    font-size: 1.5rem;
}

.pedidos-header-content p {
    margin: 0.5rem 0 0 0;
    opacity: 0.9;
}

.pedidos-header-actions {
    display: flex;
    gap: 1rem;
}

.pedidos-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-select, .filter-input {
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    min-width: 150px;
}

.filter-input {
    min-width: 200px;
}

.pedidos-table-wrapper {
    background: var(--muted);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.order-count {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
}

.pedidos-table-container {
    overflow-x: auto;
    background: white;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}

.pedidos-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.pedidos-table th {
    background: var(--accent-light);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border);
    cursor: pointer;
}

.pedidos-table th:hover {
    background: var(--muted);
}

.pedidos-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.pedidos-table tr:hover {
    background: var(--muted);
}

.loading-cell {
    text-align: center;
    padding: 3rem !important;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-orders-message {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--muted);
    border-radius: 0.75rem;
    margin-top: 2rem;
}

.no-orders-content h3 {
    margin-bottom: 1rem;
}

.no-orders-content p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.pedidos-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(var(--primary-rgb), 0.5);
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 1001;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

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

.action-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(var(--primary-rgb), 0.1);
}

.btn-primary { background: var(--primary); color: white; }
.btn-secondary { background: var(--secondary); color: var(--primary); }
.btn-success { background: var(--success); color: white; }
.btn-info { background: var(--info); color: white; }

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-pendente { background: var(--accent-light); color: var(--secondary); }
.status-preparando { background: var(--muted); color: var(--primary); }
.status-pronto { background: var(--accent-light); color: var(--primary-dark); }
.status-entregue { background: var(--accent-light); color: var(--primary); }
.status-cancelado { background: var(--muted); color: var(--error); }

@media (max-width: 768px) {
    .pedidos-header-card {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .pedidos-filters {
        flex-direction: column;
    }
    
    .filter-select, .filter-input {
        width: 100%;
    }
    
    .pedidos-table {
        font-size: 0.9rem;
    }
    
    .action-btn {
        margin-bottom: 0.5rem;
    }
}